postgresql/src/backend
Tom Lane 1b1d3d92c3 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:47 -04:00
..
access Message punctuation and pluralization fixes 2013-08-09 08:02:44 -04:00
bootstrap Use an MVCC snapshot, rather than SnapshotNow, for catalog scans. 2013-07-02 09:47:01 -04:00
catalog Remove SnapshotNow and HeapTupleSatisfiesNow. 2013-08-01 10:46:19 -04:00
commands Remove Assert that matview is not in system schema from REFRESH. 2013-08-14 12:36:55 -05:00
executor Add SQL Standard WITH ORDINALITY support for UNNEST (and any other SRF) 2013-07-29 16:38:01 +01:00
foreign Arrange to cache FdwRoutine structs in foreign tables' relcache entries. 2013-03-06 23:48:09 -05:00
lib Improve ilist.h's support for deletion of slist elements during iteration. 2013-07-24 17:42:34 -04:00
libpq Avoid reading below the start of a stack variable in tokenize_file(). 2013-06-12 19:50:52 -04:00
main Renovate display of non-ASCII messages on Windows. 2013-06-26 11:17:33 -04:00
nodes Remove ph_may_need from PlaceHolderInfo, with attendant simplifications. 2013-08-14 18:38:47 -04:00
optimizer Remove ph_may_need from PlaceHolderInfo, with attendant simplifications. 2013-08-14 18:38:47 -04:00
parser Message style improvements 2013-08-07 22:48:40 -04:00
po Translation updates 2013-06-24 14:16:44 -04:00
port Message style improvements 2013-08-07 22:48:40 -04:00
postmaster Emit a log message if output is about to be redirected away from stderr. 2013-08-13 15:24:52 -04:00
regex Fix regex match failures for backrefs combined with non-greedy quantifiers. 2013-07-18 21:22:37 -04:00
replication Message style improvements 2013-07-28 07:01:13 -04:00
rewrite Move strip_implicit_coercions() from optimizer to nodeFuncs.c. 2013-07-23 18:21:19 -04:00
snowball Update copyrights for 2013 2013-01-01 17:15:01 -05:00
storage Fix typo in comment. 2013-08-02 09:15:42 -04:00
tcop Add session_preload_libraries configuration parameter 2013-07-12 21:23:50 -04:00
tsearch pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
utils Emit a log message if output is about to be redirected away from stderr. 2013-08-13 15:24:52 -04:00
.gitignore
common.mk Call check_keywords.pl in maintainer-check 2012-02-27 13:53:12 +02:00
Makefile Move relpath() to libpgcommon 2013-02-21 22:46:17 -03:00
nls.mk Translation updates 2013-05-05 22:34:23 -04:00