postgresql/src
Tom Lane 7c1719bc68 Fix handling of data-modifying CTE subplans in EvalPlanQual.
We can't just skip initializing such subplans, because the referencing CTE
node will expect to find the subplan available when it initializes.  That
in turn means that ExecInitModifyTable must allow the case (which actually
it needed to do anyway, since there's no guarantee that ModifyTable is
exactly at the top of the CTE plan tree).  So move the complaint about not
being allowed in EvalPlanQual mode to execution instead of initialization.
Testing turned up yet another problem, which is that we'd try to
re-initialize the result relation's index list, leading to leaks and
dangling pointers.

Per report from Phil Sorber.  Back-patch to 9.1 where data-modifying CTEs
were introduced.
2012-01-28 17:43:57 -05:00
..
backend Fix handling of data-modifying CTE subplans in EvalPlanQual. 2012-01-28 17:43:57 -05:00
bin pg_dump: Move connection-setup code to a separate function. 2012-01-27 10:59:27 -05:00
include Use parameterized paths to generate inner indexscans more flexibly. 2012-01-27 19:26:38 -05:00
interfaces Ecpglib stores variables that are used in DECLARE statements in a global list. 2012-01-05 14:08:45 +01:00
makefiles Add pg_upgrade test suite 2011-11-27 22:42:32 +02:00
pl Improve efficiency of recent changes to plperl's sv2cstr(). 2012-01-15 16:15:04 -05:00
port Revert binary change in copyright year adjustment. 2012-01-01 19:40:13 -05:00
template Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
test Show default privileges in information schema 2012-01-27 21:58:51 +02:00
timezone Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
tools Fix pathname in pgindent README. 2012-01-09 13:31:58 -05:00
tutorial Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
bcc32.mak Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02: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 Fix some oversights in distprep and maintainer-clean targets. 2011-03-10 00:04:05 -05:00
Makefile.global.in Make distprep and *clean build targets recurse into all subdirectories. 2011-07-03 13:55:12 -04:00
Makefile.shlib Use single quotes in preference to double quotes for protecting pathnames. 2011-06-15 21:45:23 -04:00
nls-global.mk Sort compendium lists for msgmerge 2011-12-27 20:22:51 +02:00
win32.mak Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00