aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/preproc/variable.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2016-12-11 13:09:57 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2016-12-11 13:09:57 -0500
commitc6caa520008761b2ce9c88f46e537d3044cf7c96 (patch)
tree3112ff06fd39db3491cddd1a500b6bf3dbde55c6 /src/interfaces/ecpg/preproc/variable.c
parent00858728fd718a9e29fa1dd3311a5e742f83ab5c (diff)
downloadpostgresql-c6caa520008761b2ce9c88f46e537d3044cf7c96.tar.gz
postgresql-c6caa520008761b2ce9c88f46e537d3044cf7c96.zip
Prevent crash when ts_rewrite() replaces a non-top-level subtree with null.
When ts_rewrite()'s replacement argument is an empty tsquery, it's supposed to simplify any operator nodes whose operand(s) become NULL; but it failed to do that reliably, because dropvoidsubtree() only examined the top level of the result tree. Rather than make a second recursive pass, let's just give the responsibility to dofindsubquery() to simplify while it's doing the main replacement pass. Per report from Andreas Seltenreich. Artur Zakirov, with some cosmetic changes by me. Back-patch to all supported branches. Discussion: https://postgr.es/m/8737i01dew.fsf@credativ.de
Diffstat (limited to 'src/interfaces/ecpg/preproc/variable.c')
0 files changed, 0 insertions, 0 deletions