Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This adds the type
tsqueryof text search, astsquery.c,tsquery_op.c,tsquery_util.candtsquery_cleanup.chave it. The functions that need a text search configuration, such asto_tsquery, and the match operator@@are not in this change.Changes
rupg-typeshas the newQueryItemandValue::TsQuery. A value is the list of its operands and operators in prefix order, as PostgreSQL keeps it.tsquery_parsefollowsgettoken_query_standardandmakepol: the operators!,&,|,<->and<N>, parentheses, quotes, weights and*. It has the errors42601,22023and54000, and the errorXX000when more than 32 operators wait for an operand.tsquery_deparse,tsquery_sendandtsquery_recvgive the text and binary forms. The receive function has the checks oftsqueryrecv.tsquery_cmpgives the order ofCompareTSQ. It uses the legacy CRC of PostgreSQL for each lexeme, so the order is the same as the order of PostgreSQL.rupg-funchasnumnode,querytree,tsquery_phrase, the operators&&,||,!!,<->,@>and<@,tsquery_cmpand the comparison operators.NOTICEof PostgreSQL. A message of a function with a SQLSTATE of class00is now aNOTICE, and any other message is aWARNING.pg_input_is_validsends no notice, as in PostgreSQL.Bindmessage now sends the notices of the input functions of the parameters, with the context of the parameter. Before this change, the session dropped them.tsqueryin a stored expression keeps the bytes of its binary form.Known differences
max_stack_depth. Here the limit is 1000 levels, as the analyzer has for an expression. The error is the same.Tests
tsqueryis the output of PostgreSQL 19 for the same script in a new database. It has the input and its errors, the notice, the output, the order, each function and operator, the limits, arrays,GROUP BY,pg_input_is_valid,pg_input_error_info, text and binaryCOPYand a query with parameters.