Fix erroneous parsing of tsquery input "... & !(subexpression) | ..."

Tom Lane <tgl@sss.pgh.pa.us>

Commit: b053c532489a3fa1e01b196c15a0f14138ee9c3a
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2010-12-19T17:48:58Z
Releases: 8.2.20
Fix erroneous parsing of tsquery input "... & !(subexpression) | ..."

After parsing a parenthesized subexpression, we must pop all pending
ANDs and NOTs off the stack, just like the case for a simple operand.
Per bug #5793.

Also fix clones of this routine in contrib/intarray and contrib/ltree,
where input of types query_int and ltxtquery had the same problem.

Back-patch to all supported versions.

Files

PathChange+/−
contrib/intarray/_int_bool.c modified +2 −2
contrib/ltree/ltxtquery_io.c modified +2 −2
contrib/tsearch2/query.c modified +2 −2