postgresql/src/backend
Tom Lane ceaf5052c6 Fix nested PlaceHolderVar expressions that appear only in targetlists.
A PlaceHolderVar's expression might contain another, lower-level
PlaceHolderVar.  If the outer PlaceHolderVar is used, the inner one
certainly will be also, and so we have to make sure that both of them get
into the placeholder_list with correct ph_may_need values during the
initial pre-scan of the query (before deconstruct_jointree starts).
We did this correctly for PlaceHolderVars appearing in the query quals,
but overlooked the issue for those appearing in the top-level targetlist;
with the result that nested placeholders referenced only in the targetlist
did not work correctly, as illustrated in bug #6154.

While at it, add some error checking to find_placeholder_info to ensure
that we don't try to create new placeholders after it's too late to do so;
they have to all be created before deconstruct_jointree starts.

Back-patch to 8.4 where the PlaceHolderVar mechanism was introduced.
2011-08-09 00:49:11 -04:00
..
access Fix two ancient bugs in GiST code to re-find a parent after page split: 2011-07-15 11:05:49 +03:00
bootstrap Avoid changing an index's indcheckxmin horizon during REINDEX. 2011-04-19 18:51:08 -04:00
catalog Fix aboriginal copy-paste mistake in error message 2011-06-13 17:54:12 -04:00
commands Fix EXPLAIN to handle gating Result nodes within inner-indexscan subplans. 2011-07-03 01:35:22 -04:00
executor Avoid integer overflow when LIMIT + OFFSET >= 2^63. 2011-08-02 11:31:15 +03:00
foreign Always pass catalog id to the options validator function specified in 2009-12-23 12:24:16 +00:00
lib Update copyright for 2009. 2009-01-01 17:24:05 +00:00
libpq Use OpenSSL's SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER flag. 2011-07-24 15:18:07 -04:00
main Update copyright for 2009. 2009-01-01 17:24:05 +00:00
nodes Add a stack overflow check to copyObject(). 2010-12-06 22:55:56 -05:00
optimizer Fix nested PlaceHolderVar expressions that appear only in targetlists. 2011-08-09 00:49:11 -04:00
parser Expose the "*VALUES*" alias that we generate for a stand-alone VALUES list. 2011-06-04 15:48:31 -04:00
po Fixed string in German translation that causes segfault. 2011-06-20 13:58:03 +02:00
port Modernize dlopen interface code for FreeBSD and OpenBSD. 2011-04-07 15:14:51 -04:00
postmaster Fix VACUUM so that it always updates pg_class.reltuples/relpages. 2011-05-30 17:07:19 -04:00
regex Change regexp engine's ccondissect/crevdissect routines to perform DFA 2010-02-01 02:45:35 +00:00
rewrite Make FOR UPDATE/SHARE in the primary query not propagate into WITH queries; 2009-10-27 17:11:30 +00:00
snowball Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:08 +02:00
storage Don't throw a warning if vacuum sees PD_ALL_VISIBLE flag set on a page that 2011-03-08 20:30:09 +02:00
tcop On IA64 architecture, we check the depth of the register stack in addition 2011-04-13 11:53:06 +03:00
tsearch Fix tsmatchsel() to account properly for null rows. 2011-02-17 19:01:01 -05:00
utils Add overflow checks to int4 and int8 versions of generate_series(). 2011-06-17 14:32:44 -04:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:08 +02:00
common.mk Code coverage testing with gcov. Documentation is in the regression test 2008-09-05 12:11:18 +00:00
Makefile Well, the systemtap guys moved the goalposts again: with the latest version, 2010-01-20 23:12:15 +00:00
nls.mk Translation updates for 8.4.5 2010-09-30 23:31:19 +03:00