postgresql/src
Tom Lane d543170f2f Don't split up SRFs when choosing to postpone SELECT output expressions.
In commit 9118d03a8c we taught the planner to postpone evaluation of
set-returning functions in a SELECT's targetlist until after any sort done
to satisfy ORDER BY.  However, if we postpone some SRFs this way while
others do not get postponed (because they're sort or group key columns)
we will break the traditional behavior by which all SRFs in the tlist run
in-step during ExecTargetList(), so that you get the least common multiple
of their periods not the product.  Fix make_sort_input_target() so it will
not split up SRF evaluation in such cases.

There is still a hazard of similar odd behavior if there's a SRF in a
grouping column and another one that isn't, but that was true before
and we're just trying to preserve bug-compatibility with the traditional
behavior.  This whole area is overdue to be rethought and reimplemented,
but we'll try to avoid changing behavior until then.

Per report from Regina Obe.
2016-03-25 11:19:51 -04:00
..
backend Don't split up SRFs when choosing to postpone SELECT output expressions. 2016-03-25 11:19:51 -04:00
bin Link libpq after libpgfeutils to satisfy Windows linker. 2016-03-24 20:45:31 -04:00
common Move keywords.c/kwlookup.c into src/common/. 2016-03-23 20:22:08 -04:00
fe_utils Move psql's psqlscan.l into src/fe_utils. 2016-03-24 20:28:47 -04:00
include Move psql's psqlscan.l into src/fe_utils. 2016-03-24 20:28:47 -04:00
interfaces Move keywords.c/kwlookup.c into src/common/. 2016-03-23 20:22:08 -04:00
makefiles Fix typos in comments and doc 2016-01-28 16:47:36 +09:00
pl Update PL/Perl's comment about hv_store(). 2016-03-14 14:45:45 -04:00
port Suppress GCC 6 warning about self-comparison 2016-03-08 19:41:51 -05:00
template Remove some remains from Alpha support removal 2015-10-29 16:40:14 -04:00
test Don't split up SRFs when choosing to postpone SELECT output expressions. 2016-03-25 11:19:51 -04:00
timezone Update time zone data files to tzdata release 2016a. 2016-02-05 10:59:09 -05:00
tools Move psql's psqlscan.l into src/fe_utils. 2016-03-24 20:28:47 -04:00
tutorial Update copyright for 2016 2016-01-02 13:33:40 -05:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
bcc32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04: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 Create src/fe_utils/, and move stuff into there from pg_dump's dumputils. 2016-03-24 15:55:57 -04:00
Makefile.global.in Create src/fe_utils/, and move stuff into there from pg_dump's dumputils. 2016-03-24 15:55:57 -04:00
Makefile.shlib AIX: Link TRANSFORM modules with their dependencies. 2015-07-15 21:00:26 -04:00
nls-global.mk Setup error context callback for transaction lock waits 2014-03-19 15:10:36 -03:00
win32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00