postgresql/src/include
Tom Lane 6c5f68ea1a Remove ph_may_need from PlaceHolderInfo, with attendant simplifications.
The planner logic that attempted to make a preliminary estimate of the
ph_needed levels for PlaceHolderVars seems to be completely broken by
lateral references.  Fortunately, the potential join order optimization
that this code supported seems to be of relatively little value in
practice; so let's just get rid of it rather than trying to fix it.

Getting rid of this allows fairly substantial simplifications in
placeholder.c, too, so planning in such cases should be a bit faster.

Issue noted while pursuing bugs reported by Jeremy Evans and Antonin
Houska, though this doesn't in itself fix either of their reported cases.
What this does do is prevent an Assert crash in the kind of query
illustrated by the added regression test.  (I'm not sure that the plan for
that query is stable enough across platforms to be usable as a regression
test output ... but we'll soon find out from the buildfarm.)

Back-patch to 9.3.  The problem case can't arise without LATERAL, so
no need to touch older branches.
2013-08-14 18:38:36 -04:00
..
access Add buffer_std flag to MarkBufferDirtyHint(). 2013-06-17 08:04:18 -07:00
bootstrap Update copyrights for 2013 2013-01-01 17:15:01 -05:00
catalog Add buffer_std flag to MarkBufferDirtyHint(). 2013-06-17 08:04:18 -07:00
commands Don't pass oidvector by value. 2013-06-12 19:50:37 -04:00
common pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
datatype Update copyrights for 2013 2013-01-01 17:15:01 -05:00
executor Prevent leakage of SPI tuple tables during subtransaction abort. 2013-07-25 16:45:47 -04:00
foreign Improve updatability checking for views and foreign tables. 2013-06-12 17:53:33 -04:00
lib Improve ilist.h's support for deletion of slist elements during iteration. 2013-07-24 17:42:48 -04:00
libpq pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
mb pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
nodes Remove ph_may_need from PlaceHolderInfo, with attendant simplifications. 2013-08-14 18:38:36 -04:00
optimizer Remove ph_may_need from PlaceHolderInfo, with attendant simplifications. 2013-08-14 18:38:36 -04:00
parser Fix crash in error report of invalid tuple lock 2013-08-02 13:37:40 -04:00
port pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
portability Update copyrights for 2013 2013-01-01 17:15:01 -05:00
postmaster Back-patch bgworker API changes to 9.3. 2013-07-22 15:41:44 -04:00
regex Support indexing of regular-expression searches in contrib/pg_trgm. 2013-04-09 01:06:54 -04:00
replication pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
rewrite Improve updatability checking for views and foreign tables. 2013-06-12 17:53:33 -04:00
snowball Update copyrights for 2013 2013-01-01 17:15:01 -05:00
storage Fix cpluspluscheck in checksum code 2013-06-30 19:34:14 -04:00
tcop pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
tsearch Update copyrights for 2013 2013-01-01 17:15:01 -05:00
utils Emit a log message if output is about to be redirected away from stderr. 2013-08-13 15:24:56 -04:00
.gitignore Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
c.h pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
fmgr.h Add infrastructure for storing a VARIADIC ANY function's VARIADIC flag. 2013-01-21 20:26:15 -05:00
funcapi.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
getaddrinfo.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
getopt_long.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
Makefile Install headers from the new src/include/common subdirectory. 2013-02-26 15:27:30 -05:00
miscadmin.h pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
pg_config.h.in Improve handling of ereport(ERROR) and elog(ERROR). 2013-01-13 18:40:09 -05:00
pg_config.h.win32 Stamp 9.3beta2. 2013-06-24 14:55:41 -04:00
pg_config_ext.h.in Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_ext.h.win32 Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_manual.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pg_trace.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pgstat.h Split pgstat file in smaller pieces 2013-02-18 18:12:52 -03:00
pgtar.h Move tar function headers to pgtar.h 2013-01-02 20:34:08 +01:00
pgtime.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
port.h pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
postgres.h pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
postgres_ext.h Provide database object names as separate fields in error messages. 2013-01-29 17:08:26 -05:00
postgres_fe.h Create libpgcommon, and move pg_malloc et al to it 2013-02-12 11:21:05 -03:00
rusagestub.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
windowapi.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00