diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2013-12-10 16:10:17 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2013-12-10 16:10:17 -0500 |
commit | 9ec6199d18d6235cc4b4d5e4e8986e73b55b14d8 (patch) | |
tree | f2ad089b6b8dc6bd84214bca2328fdbb8f212c42 /src/backend/commands/trigger.c | |
parent | 53685d79813a46c7e3a46ae4b1210f608d41d6ab (diff) | |
download | postgresql-9ec6199d18d6235cc4b4d5e4e8986e73b55b14d8.tar.gz postgresql-9ec6199d18d6235cc4b4d5e4e8986e73b55b14d8.zip |
Fix possible crash with nested SubLinks.
An expression such as WHERE (... x IN (SELECT ...) ...) IN (SELECT ...)
could produce an invalid plan that results in a crash at execution time,
if the planner attempts to flatten the outer IN into a semi-join.
This happens because convert_testexpr() was not expecting any nested
SubLinks and would wrongly replace any PARAM_SUBLINK Params belonging
to the inner SubLink. (I think the comment denying that this case could
happen was wrong when written; it's certainly been wrong for quite a long
time, since very early versions of the semijoin flattening logic.)
Per report from Teodor Sigaev. Back-patch to all supported branches.
Diffstat (limited to 'src/backend/commands/trigger.c')
0 files changed, 0 insertions, 0 deletions