From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@postgresql.org
Subject: pgsql: Disallow UNION/INTERSECT/EXCEPT over no columns.
Date: Fri, 22 Dec 2017 17:08:54 +0000
Message-ID: <E1eSQoY-0002KS-LE@gemulon.postgresql.org> (raw)
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(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Disallow UNION/INTERSECT/EXCEPT over no columns.
In-Reply-To: <E1eSQoY-0002KS-LE@gemulon.postgresql.org>
References: <E1eSQoY-0002KS-LE@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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