postgresql/src/backend
Tom Lane 5f129cf942 Fix thinko in previous patch for optimizing EXISTS-within-EXISTS.
When recursing after an optimization in pull_up_sublinks_qual_recurse, the
available_rels value passed down must include only the relations that are
in the righthand side of the new SEMI or ANTI join; it's incorrect to pull
up a sub-select that refers to other relations, as seen in the added test
case.  Per report from BangarRaju Vadapalli.

While at it, rethink the idea of recursing below a NOT EXISTS.  That is
essentially the same situation as pulling up ANY/EXISTS sub-selects that
are in the ON clause of an outer join, and it has the same disadvantage:
we'd force the two joins to be evaluated according to the syntactic nesting
order, because the lower join will most likely not be able to commute with
the ANTI join.  That could result in having to form a rather large join
product, whereas the handling of a correlated subselect is not quite that
dumb.  So until we can handle those cases better, #ifdef NOT_USED that
case.  (I think it's okay to pull up in the EXISTS/ANY cases, because SEMI
joins aren't so inflexible about ordering.)

Back-patch to 8.4, same as for previous patch in this area.  Fortunately
that patch hadn't made it into any shipped releases yet.
2011-06-20 14:33:54 -04:00
..
access Respect Hot Standby controls while recycling btree index pages. 2011-06-16 10:12:50 +01:00
bootstrap Avoid changing an index's indcheckxmin horizon during REINDEX. 2011-04-19 18:51:03 -04:00
catalog Fix aboriginal copy-paste mistake in error message 2011-06-13 17:54:36 -04:00
commands Fix thinko in previous patch to always update pg_class.reltuples/relpages. 2011-06-19 14:01:01 -04:00
executor Disallow SELECT FOR UPDATE/SHARE on sequences. 2011-06-02 14:46:22 -04: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 Fix portability bugs in use of credentials control messages for peer auth. 2011-05-30 19:16:11 -04:00
main Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00
nodes Fix bogus test for hypothetical indexes in get_actual_variable_range(). 2011-02-16 19:24:50 -05:00
optimizer Fix thinko in previous patch for optimizing EXISTS-within-EXISTS. 2011-06-20 14:33:54 -04:00
parser Expose the "*VALUES*" alias that we generate for a stand-alone VALUES list. 2011-06-04 15:48:25 -04:00
po Fixed string in German translation that causes segfault. 2011-06-20 13:56:11 +02:00
port Modernize dlopen interface code for FreeBSD and OpenBSD. 2011-04-07 15:14:44 -04:00
postmaster Fix VACUUM so that it always updates pg_class.reltuples/relpages. 2011-05-30 17:07:07 -04:00
regex pgindent run for 9.0 2010-02-26 02:01:40 +00:00
replication Before exiting walreceiver, fsync() all the WAL received. 2011-01-17 12:29:15 +02:00
rewrite pgindent run for 9.0 2010-02-26 02:01:40 +00:00
snowball Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:06 +02:00
storage Prevent intermittent hang in recovery from bgwriter interaction. 2011-03-23 13:32:37 +00:00
tcop On IA64 architecture, we check the depth of the register stack in addition 2011-04-13 11:52:54 +03:00
tsearch Fix tsmatchsel() to account properly for null rows. 2011-02-17 19:00:54 -05:00
utils Add overflow checks to int4 and int8 versions of generate_series(). 2011-06-17 14:32:32 -04:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:06 +02: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 Translation updates for release 9.0.2 2010-12-13 23:20:00 +02:00