Re: websearch_to_tsquery() returns queries that don't match to_tsvector() - Mailing list pgsql-hackers

From Tom Lane
Subject Re: websearch_to_tsquery() returns queries that don't match to_tsvector()
Date
Msg-id 3712828.1619978696@sss.pgh.pa.us
Whole thread Raw
In response to Re: websearch_to_tsquery() returns queries that don't match to_tsvector()  (Alexander Korotkov <aekorotkov@gmail.com>)
Responses Re: websearch_to_tsquery() returns queries that don't match to_tsvector()
List pgsql-hackers
Alexander Korotkov <aekorotkov@gmail.com> writes:
> Ooops, I've included this by oversight.  The next revision is attached.
> Anything besides that?

Some quick eyeball review:

+                    /* Everything is quotes is processed as a single token */

Should read "Everything in quotes ..."

-                    /* or else gettoken_tsvector() will raise an error */
+                    /* or else ƒtsvector() will raise an error */

Looks like an unintentional change?

@@ -846,7 +812,6 @@ parse_tsquery(char *buf,
     state.buffer = buf;
     state.buf = buf;
     state.count = 0;
-    state.in_quotes = false;
     state.state = WAITFIRSTOPERAND;
     state.polstr = NIL;

This change seems wrong/unsafe too.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Alexander Korotkov
Date:
Subject: Re: websearch_to_tsquery() returns queries that don't match to_tsvector()
Next
From: Zhihong Yu
Date:
Subject: Re: websearch_to_tsquery() returns queries that don't match to_tsvector()