pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alexander Korotkov <aekorotkov@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
Cc: Teodor Sigaev <teodor@postgrespro.ru>
Cc: Oleg Bartunov <obartunov@postgrespro.ru>
Subject: Re: websearch_to_tsquery() returns queries that don't match to_tsvector()
Date: Sun, 02 May 2021 14:04:56 -0400
Message-ID: <3712828.1619978696@sss.pgh.pa.us> (raw)
In-Reply-To: <CAPpHfdsbr7OX+9F3S8igH5fJkyQwE_g5J4DMEiLwM0=4+nQxZw@mail.gmail.com>
References: <CA+0DEqiZs7gdOd4ikmg=0UWG+SwWOLxPsk_JW-sx9WNOyrb0KQ@mail.gmail.com>
	<CAPpHfdsKy5TzOTq5aV8tn+KQEd_C5mF0Sd_BrZ0e3+wGY5tLFw@mail.gmail.com>
	<3712260.1619977947@sss.pgh.pa.us>
	<CAPpHfdsbr7OX+9F3S8igH5fJkyQwE_g5J4DMEiLwM0=4+nQxZw@mail.gmail.com>

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





view thread (12+ messages)  latest in thread

Message-ID: <3712828.1619978696@sss.pgh.pa.us>
Permalink:  ../3712828.1619978696@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3712828.1619978696@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, aekorotkov@gmail.com, pgsql-hackers@lists.postgresql.org, valentin.gatienbaron@gmail.com, teodor@postgrespro.ru, obartunov@postgrespro.ru
  Subject: Re: websearch_to_tsquery() returns queries that don't match to_tsvector()
  In-Reply-To: <3712828.1619978696@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox