postgresql/src
Tom Lane d3d3ec0d89 Fix EXPLAIN to handle gating Result nodes within inner-indexscan subplans.
It is possible for a NestLoop plan node to pass an OUTER Var into an
"inner indexscan" that is an Append construct (derived from an inheritance
tree or UNION ALL subquery).  The OUTER tuple is then passed down at
runtime to the leaf indexscan node(s) where it will actually be used.
EXPLAIN has to likewise pass the information about the nestloop's outer
subplan down through the Append node, else it will fail to print the
outer-reference Vars (with complaints like "bogus varno: 65001").

However, there was a case missed in all this: we could also have gating
Result nodes that were inserted into the appendrel plan tree to deal with
pseudoconstant qual conditions.  So EXPLAIN has to pass down the outer plan
node to a Result's subplan, too.  Per example from Jon Nelson.

The problem is gone in 9.1 because we replaced the nestloop outer-tuple
kluge with a Param-based data transfer mechanism.  Also, so far as I can
tell, the case can't happen before 8.4 because of restrictions on what
sorts of appendrel members could be pulled up into the parent query.
So this patch is only needed for 8.4 and 9.0.
2011-07-03 01:35:22 -04:00
..
backend Fix EXPLAIN to handle gating Result nodes within inner-indexscan subplans. 2011-07-03 01:35:22 -04:00
bin Obtain table locks as soon as practical during pg_dump. 2011-06-17 18:19:21 -04:00
include Fix VACUUM so that it always updates pg_class.reltuples/relpages. 2011-05-30 17:07:19 -04:00
interfaces Fix assorted issues with build and install paths containing spaces. 2011-06-14 16:03:20 -04:00
makefiles Fix assorted issues with build and install paths containing spaces. 2011-06-14 16:03:20 -04:00
pl Fix assorted issues with build and install paths containing spaces. 2011-06-14 16:03:20 -04:00
port Tag 8.4.8. 2011-04-15 00:17:14 -03:00
template Tweak configure to attempt to add -qnoansialias to CFLAGS whenever running 2009-02-11 20:02:40 +00:00
test Fix thinko in previous patch for optimizing EXISTS-within-EXISTS. 2011-06-20 14:34:06 -04:00
timezone Update time zone data files to tzdata release 2011f. 2011-04-13 18:04:46 -04:00
tools Avoid use of mixed slash style paths in arguments to xcopy in MSVC builds. 2011-04-07 22:16:43 -04:00
tutorial Remove copyright mention of Andrew Yu, per author's permission. 2010-02-02 18:52:06 +00:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:08 +02: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 Add the possibility to specify an explicit validator function for foreign-data 2009-02-24 10:06:36 +00:00
Makefile.global.in Fix the makefiles to fail cleanly if Perl is needed but not present. This 2009-06-23 03:46:00 +00:00
Makefile.shlib Fix assorted issues with build and install paths containing spaces. 2011-06-14 16:03:20 -04:00
nls-global.mk Do not msgmerge against /dev/null; merge against the pot file itself 2009-01-20 09:58:50 +00:00
win32.mak Update supported standalone VC++ version to 7.1+ only, and fix 2007-08-03 10:47:11 +00:00