aboutsummaryrefslogtreecommitdiff
path: root/src/backend/tcop/postgres.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2008-08-17 19:40:11 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2008-08-17 19:40:11 +0000
commit719012e013f10f72938520c46889c52df40fa329 (patch)
treea87f2a1051080d6c56628a6956d508b00609afcc /src/backend/tcop/postgres.c
parentf2689e421d7ca0a103e33f5b92bb0676c80e1d04 (diff)
downloadpostgresql-719012e013f10f72938520c46889c52df40fa329.tar.gz
postgresql-719012e013f10f72938520c46889c52df40fa329.zip
Add some defenses against constant-FALSE outer join conditions. Since
eval_const_expressions will generally throw away anything that's ANDed with constant FALSE, what we're left with given an example like select * from tenk1 a where (unique1,0) in (select unique2,1 from tenk1 b); is a cartesian product computation, which is really not acceptable. This is a regression in CVS HEAD compared to previous releases, which were able to notice the impossible join condition in this case --- though not in some related cases that are also improved by this patch, such as select * from tenk1 a left join tenk1 b on (a.unique1=b.unique2 and 0=1); Fix by skipping evaluation of the appropriate side of the outer join in cases where it's demonstrably unnecessary.
Diffstat (limited to 'src/backend/tcop/postgres.c')
0 files changed, 0 insertions, 0 deletions