pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Disallow UNION/INTERSECT/EXCEPT over no columns. 3+ messages / 1 participants [nested] [flat]
* pgsql: Disallow UNION/INTERSECT/EXCEPT over no columns. @ 2017-12-22 17:08 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 3+ messages in thread From: Tom Lane @ 2017-12-22 17:08 UTC (permalink / raw) To: pgsql-committers Disallow UNION/INTERSECT/EXCEPT over no columns. Since 9.4, we've allowed the syntax "select union select" and variants of that. However, the planner wasn't expecting a no-column set operation and ended up treating the set operation as if it were UNION ALL. Pre-v10, there seem to be some executor issues that would need to be fixed to support such cases, and it doesn't really seem worth expending much effort on. Just disallow it, instead. Per report from Victor Yegorov. Discussion: https://postgr.es/m/CAGnEbojGJrRSOgJwNGM7JSJZpVAf8xXcVPbVrGdhbVEHZ-BUMw@mail.gmail.com Branch ------ REL9_6_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/bd29bc417e7130312b47ba0da244c020a0193694 Modified Files -------------- src/backend/optimizer/prep/prepunion.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: Disallow UNION/INTERSECT/EXCEPT over no columns. @ 2017-12-22 17:08 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 3+ messages in thread From: Tom Lane @ 2017-12-22 17:08 UTC (permalink / raw) To: pgsql-committers Disallow UNION/INTERSECT/EXCEPT over no columns. Since 9.4, we've allowed the syntax "select union select" and variants of that. However, the planner wasn't expecting a no-column set operation and ended up treating the set operation as if it were UNION ALL. Pre-v10, there seem to be some executor issues that would need to be fixed to support such cases, and it doesn't really seem worth expending much effort on. Just disallow it, instead. Per report from Victor Yegorov. Discussion: https://postgr.es/m/CAGnEbojGJrRSOgJwNGM7JSJZpVAf8xXcVPbVrGdhbVEHZ-BUMw@mail.gmail.com Branch ------ REL9_4_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/e1b8e0e4a61ed100510d70e63930273a6614cec4 Modified Files -------------- src/backend/optimizer/prep/prepunion.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: Disallow UNION/INTERSECT/EXCEPT over no columns. @ 2017-12-22 17:08 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 3+ messages in thread From: Tom Lane @ 2017-12-22 17:08 UTC (permalink / raw) To: pgsql-committers Disallow UNION/INTERSECT/EXCEPT over no columns. Since 9.4, we've allowed the syntax "select union select" and variants of that. However, the planner wasn't expecting a no-column set operation and ended up treating the set operation as if it were UNION ALL. Pre-v10, there seem to be some executor issues that would need to be fixed to support such cases, and it doesn't really seem worth expending much effort on. Just disallow it, instead. Per report from Victor Yegorov. Discussion: https://postgr.es/m/CAGnEbojGJrRSOgJwNGM7JSJZpVAf8xXcVPbVrGdhbVEHZ-BUMw@mail.gmail.com Branch ------ REL9_5_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/a84e90bb249d3ece4041f46651b4de566b7f6684 Modified Files -------------- src/backend/optimizer/prep/prepunion.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2017-12-22 17:08 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2017-12-22 17:08 pgsql: Disallow UNION/INTERSECT/EXCEPT over no columns. Tom Lane <tgl@sss.pgh.pa.us> 2017-12-22 17:08 pgsql: Disallow UNION/INTERSECT/EXCEPT over no columns. Tom Lane <tgl@sss.pgh.pa.us> 2017-12-22 17:08 pgsql: Disallow UNION/INTERSECT/EXCEPT over no columns. Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox