]> granicus.if.org Git - postgresql/commit
Fix erroneous parsing of tsquery input "... & !(subexpression) | ..."
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 19 Dec 2010 17:48:58 +0000 (12:48 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 19 Dec 2010 17:48:58 +0000 (12:48 -0500)
commitb053c532489a3fa1e01b196c15a0f14138ee9c3a
treef9a9fb1b52798c61ac457183869d3fc74c8843ec
parent10de92f87fdf78f764e620a4be8c6f72b4fff18b
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.
contrib/intarray/_int_bool.c
contrib/ltree/ltxtquery_io.c
contrib/tsearch2/query.c