pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Prevent crash when ts_rewrite() replaces a non-top-level subtree 6+ messages / 1 participants [nested] [flat]
* pgsql: Prevent crash when ts_rewrite() replaces a non-top-level subtree @ 2016-12-11 18:10 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2016-12-11 18:10 UTC (permalink / raw) To: pgsql-committers 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 Branch ------ REL9_5_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/c6caa520008761b2ce9c88f46e537d3044cf7c96 Modified Files -------------- src/backend/utils/adt/tsquery_rewrite.c | 58 ++++++++++++++++----------------- src/test/regress/expected/tsearch.out | 15 +++++++++ src/test/regress/sql/tsearch.sql | 3 ++ 3 files changed, 47 insertions(+), 29 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Prevent crash when ts_rewrite() replaces a non-top-level subtree @ 2016-12-11 18:10 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2016-12-11 18:10 UTC (permalink / raw) To: pgsql-committers 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 Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/0eaaaf00e296c2048b868b7c1d3c12c0eae6dd12 Modified Files -------------- src/backend/utils/adt/tsquery_rewrite.c | 58 ++++++++++++++++----------------- src/test/regress/expected/tsearch.out | 15 +++++++++ src/test/regress/sql/tsearch.sql | 3 ++ 3 files changed, 47 insertions(+), 29 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Prevent crash when ts_rewrite() replaces a non-top-level subtree @ 2016-12-11 18:10 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2016-12-11 18:10 UTC (permalink / raw) To: pgsql-committers 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 Branch ------ REL9_6_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/c8bfe055be9c688d7084546245c59f7f12a7c606 Modified Files -------------- src/backend/utils/adt/tsquery_rewrite.c | 58 ++++++++++++++++----------------- src/test/regress/expected/tsearch.out | 15 +++++++++ src/test/regress/sql/tsearch.sql | 3 ++ 3 files changed, 47 insertions(+), 29 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Prevent crash when ts_rewrite() replaces a non-top-level subtree @ 2016-12-11 18:10 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2016-12-11 18:10 UTC (permalink / raw) To: pgsql-committers 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 Branch ------ REL9_3_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/79e1a9efa808d2e15ea41d06d7696a6daab05467 Modified Files -------------- src/backend/utils/adt/tsquery_rewrite.c | 58 ++++++++++++++++----------------- src/test/regress/expected/tsearch.out | 15 +++++++++ src/test/regress/sql/tsearch.sql | 3 ++ 3 files changed, 47 insertions(+), 29 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Prevent crash when ts_rewrite() replaces a non-top-level subtree @ 2016-12-11 18:10 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2016-12-11 18:10 UTC (permalink / raw) To: pgsql-committers 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 Branch ------ REL9_2_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/f4ccee408d7fc9d52adf9a9153130f1298e3acb1 Modified Files -------------- src/backend/utils/adt/tsquery_rewrite.c | 58 ++++++++++++++++----------------- src/test/regress/expected/tsearch.out | 15 +++++++++ src/test/regress/sql/tsearch.sql | 3 ++ 3 files changed, 47 insertions(+), 29 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Prevent crash when ts_rewrite() replaces a non-top-level subtree @ 2016-12-11 18:10 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2016-12-11 18:10 UTC (permalink / raw) To: pgsql-committers 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 Branch ------ REL9_4_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/6f5cb982e7df8f277505fd2028be83211d586769 Modified Files -------------- src/backend/utils/adt/tsquery_rewrite.c | 58 ++++++++++++++++----------------- src/test/regress/expected/tsearch.out | 15 +++++++++ src/test/regress/sql/tsearch.sql | 3 ++ 3 files changed, 47 insertions(+), 29 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2016-12-11 18:10 UTC | newest] Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2016-12-11 18:10 pgsql: Prevent crash when ts_rewrite() replaces a non-top-level subtree Tom Lane <tgl@sss.pgh.pa.us> 2016-12-11 18:10 pgsql: Prevent crash when ts_rewrite() replaces a non-top-level subtree Tom Lane <tgl@sss.pgh.pa.us> 2016-12-11 18:10 pgsql: Prevent crash when ts_rewrite() replaces a non-top-level subtree Tom Lane <tgl@sss.pgh.pa.us> 2016-12-11 18:10 pgsql: Prevent crash when ts_rewrite() replaces a non-top-level subtree Tom Lane <tgl@sss.pgh.pa.us> 2016-12-11 18:10 pgsql: Prevent crash when ts_rewrite() replaces a non-top-level subtree Tom Lane <tgl@sss.pgh.pa.us> 2016-12-11 18:10 pgsql: Prevent crash when ts_rewrite() replaces a non-top-level subtree Tom Lane <tgl@sss.pgh.pa.us>
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