postgresql/src/backend
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
..
access Fix misleading DEBUG2 issued during RemoveOldXlogFiles() 2010-08-30 15:38:17 +00:00
bootstrap Move the responsibility for calling StartupXLOG into InitPostgres, for 2010-04-20 01:38:52 +00:00
catalog Improve wording for privilege description on certain failure messages; the 2010-08-26 19:49:41 +00:00
commands Fix possible corruption of AfterTriggerEventLists in subtransaction rollback. 2010-08-19 15:46:24 +00:00
executor Fix ExecMakeTableFunctionResult to verify that all rows returned by a SRF 2010-08-26 18:54:44 +00:00
foreign Wrap calls to SearchSysCache and related functions using macros. 2010-02-14 18:42:19 +00:00
lib pgindent run for 9.0, second run 2010-07-06 19:19:02 +00:00
libpq Document the existence of the socket lock file under unix_socket_directory, 2010-08-26 22:00:32 +00:00
main Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00
nodes Fix failure of "ALTER TABLE t ADD COLUMN c serial" when done by non-owner. 2010-08-18 18:35:30 +00:00
optimizer Fix join-removal logic for pseudoconstant and outerjoin-delayed quals. 2010-09-14 23:15:37 +00:00
parser Revert patch to coerce 'unknown' type parameters in the backend. As Tom 2010-08-19 16:54:48 +00:00
po Translation updates for 9.0rc1 2010-08-26 19:23:10 +00:00
port Improve hint message for ENOMEM failure from shmget(). 2010-08-25 20:10:59 +00:00
postmaster pgindent run for 9.0, second run 2010-07-06 19:19:02 +00:00
regex pgindent run for 9.0 2010-02-26 02:01:40 +00:00
replication pgindent run for 9.0, second run 2010-07-06 19:19:02 +00:00
rewrite pgindent run for 9.0 2010-02-26 02:01:40 +00:00
snowball Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00
storage Cosmetic fixes for KnownAssignedXidsGetOldestXmin, per Fujii Masao. 2010-08-30 17:30:49 +00:00
tcop Fix failure of "ALTER TABLE t ADD COLUMN c serial" when done by non-owner. 2010-08-18 18:35:30 +00:00
tsearch Tweak tsmatchsel() so that it examines the structure of the tsquery whenever 2010-07-31 03:27:48 +00:00
utils Process options from the startup packed in walsender. Only few options 2010-09-13 09:00:35 +00:00
common.mk Expand test coverage support to entire tree 2009-08-07 20:50:22 +00:00
Makefile Split the LDFLAGS make variable into two parts: LDFLAGS is now used for 2010-07-05 18:54:38 +00:00
nls.mk Convert the core lexer and parser into fully reentrant code, by making use 2009-07-13 02:02:20 +00:00