aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/tsquery_rewrite.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2016-10-30 15:24:40 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2016-10-30 15:24:40 -0400
commit24ebc444c61306f50777f674544e8559e765ad81 (patch)
tree3c9efe8a40198f7ec63be751cf9a587e0ade2d1c /src/backend/utils/adt/tsquery_rewrite.c
parent9a00f03e479c2d4911eed5b4bd1994315d409938 (diff)
downloadpostgresql-24ebc444c61306f50777f674544e8559e765ad81.tar.gz
postgresql-24ebc444c61306f50777f674544e8559e765ad81.zip
Fix bogus tree-flattening logic in QTNTernary().
QTNTernary() contains logic to flatten, eg, '(a & b) & c' into 'a & b & c', which is all well and good, but it tries to do that to NOT nodes as well, so that '!!a' gets changed to '!a'. Explicitly restrict the conversion to be done only on AND and OR nodes, and add a test case illustrating the bug. In passing, provide some comments for the sadly naked functions in tsquery_util.c, and simplify some baroque logic in QTNFree(), which I think may have been leaking some items it intended to free. Noted while investigating a complaint from Andreas Seltenreich. Back-patch to all supported versions.
Diffstat (limited to 'src/backend/utils/adt/tsquery_rewrite.c')
0 files changed, 0 insertions, 0 deletions