postgresql/src/backend
Tom Lane ac45aa1dde Don't assume a subquery's output is unique if there's a SRF in its tlist.
While the x output of "select x from t group by x" can be presumed unique,
this does not hold for "select x, generate_series(1,10) from t group by x",
because we may expand the set-returning function after the grouping step.
(Perhaps that should be re-thought; but considering all the other oddities
involved with SRFs in targetlists, it seems unlikely we'll change it.)
Put a check in query_is_distinct_for() so it's not fooled by such cases.

Back-patch to all supported branches.

David Rowley
2014-07-08 14:03:45 -04:00
..
access Have multixact be truncated by checkpoint, not vacuum 2014-06-27 14:43:52 -04:00
bootstrap Revert "Fix bogus %name-prefix option syntax in all our Bison files." 2014-05-28 19:21:01 -04:00
catalog Remove use_json_as_text options from json_to_record/json_populate_record. 2014-06-29 13:51:02 -04:00
commands Have multixact be truncated by checkpoint, not vacuum 2014-06-27 14:43:52 -04:00
executor Redesign API presented by nodeAgg.c for ordered-set and similar aggregates. 2014-07-03 18:25:37 -04:00
foreign Update copyright for 2014 2014-01-07 16:05:30 -05:00
lib pgindent run for 9.4 2014-05-06 12:12:18 -04:00
libpq Rename lo_create(oid, bytea) to lo_from_bytea(). 2014-06-12 15:39:16 -04:00
main Make fallback implementation of pg_memory_barrier() work. 2014-05-17 18:29:46 -04:00
nodes pgindent run for 9.4 2014-05-06 12:12:18 -04:00
optimizer Don't assume a subquery's output is unique if there's a SRF in its tlist. 2014-07-08 14:03:45 -04:00
parser Revert "Fix bogus %name-prefix option syntax in all our Bison files." 2014-05-28 19:21:01 -04:00
po Translation updates 2014-05-10 22:16:59 -04:00
port Fix weird spacing in error message. 2014-06-18 15:44:38 -04:00
postmaster Smooth reporting of commit/rollback statistics. 2014-07-02 15:03:57 -05:00
regex pgindent run for 9.4 2014-05-06 12:12:18 -04:00
replication Fix decoding of MULTI_INSERTs when rows other than the last are toasted. 2014-07-06 15:59:53 +02:00
rewrite Add some errdetail to checkRuleResultList(). 2014-07-02 12:31:27 -04:00
snowball Fix ancient encoding error in hungarian.stop. 2014-06-10 22:48:31 -04:00
storage Add defenses against running with a wrong selection of LOBLKSIZE. 2014-06-05 11:31:06 -04:00
tcop Set the process latch when processing recovery conflict interrupts. 2014-06-03 14:02:54 +02:00
tsearch pgindent run for 9.4 2014-05-06 12:12:18 -04:00
utils Consistently pass an "unsigned char" to ctype.h functions. 2014-07-06 00:30:11 -04:00
.gitignore Add gitignore for mingw/cygwin build outputs 2011-06-09 18:11:47 +02:00
common.mk Remove maintainer-check target, fold into normal build 2013-10-10 20:11:56 -04:00
Makefile Get rid of use of dlltool in Mingw builds. 2014-02-11 12:56:20 -05:00
nls.mk Add libpgcommon to backend gettext source files 2013-10-19 13:49:05 -04:00