postgresql/src
Tom Lane bab9f1d585 Fix join-removal logic for pseudoconstant and outerjoin-delayed quals.
In these cases a qual can get marked with the removable rel in its
required_relids, but this is just to schedule its evaluation correctly, not
because it really depends on the rel.  We were assuming that, in effect,
we could throw away *all* quals so marked, which is nonsense.  Tighten up
the logic to be a little more paranoid about which quals belong to the
outer join being considered for removal, and arrange for all quals that
don't belong to be updated so they will still get evaluated correctly.

Also fix another problem that happened to be exposed by this test case,
which was that make_join_rel() was failing to notice some cases where
a constant-false qual could be used to prove a join relation empty.  If it's
a pushed-down constant false, then the relation is empty even if it's an
outer join, because the qual applies after the outer join expansion.

Per report from Nathan Grange.  Back-patch into 9.0.
2010-09-14 23:15:37 +00:00
..
backend Fix join-removal logic for pseudoconstant and outerjoin-delayed quals. 2010-09-14 23:15:37 +00:00
bin Don't warn about an in-progress online backup, when we're recovering from 2010-09-14 08:05:54 +00:00
include Fix join-removal logic for pseudoconstant and outerjoin-delayed quals. 2010-09-14 23:15:37 +00:00
interfaces Applied Zoltan's patch to fix a few memleaks in ecpg's pgtypeslib. 2010-08-17 11:06:26 +00:00
makefiles Allow for LDFLAGS_SL already having a value in Makefile.aix. 2010-07-06 03:41:02 +00:00
pl Translation updates for 9.0rc1 2010-08-26 19:23:10 +00:00
port Modify pg_upgrade to set/restore all environment variables related to 2010-09-07 14:10:39 +00:00
template Don't try to force use of -no-cpp-precomp on OS X. It's been five years 2010-08-02 04:51:25 +00:00
test Fix join-removal logic for pseudoconstant and outerjoin-delayed quals. 2010-09-14 23:15:37 +00:00
timezone Update time zone data files to tzdata release 2010l: DST law changes in 2010-08-26 19:58:50 +00:00
tools Mention why one C file fails pgindent. 2010-07-06 19:26:28 +00:00
tutorial Remove copyright mention of Andrew Yu, per author's permission. 2010-02-02 18:52:02 +00:00
bcc32.mak Remove old-style win32 client-only visual c++ build infrastructure for everything except 2007-03-05 14:18:38 +00:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Rethink the way walreceiver is linked into the backend. Instead than shoving 2010-01-20 09:16:24 +00:00
Makefile.global.in Accept slightly grotty coding in Makefile.global in order to keep the -L 2010-07-06 22:03:05 +00:00
Makefile.shlib Still more third thoughts: when linking shared libraries, LDFLAGS probably 2010-07-06 03:55:33 +00:00
nls-global.mk Avoid error from mkdir if no languages are to be installed 2010-05-13 14:35:28 +00:00
win32.mak Update supported standalone VC++ version to 7.1+ only, and fix 2007-08-03 10:47:11 +00:00