From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Disallow UNION/INTERSECT/EXCEPT over no columns. |
Date: | 2017-12-22 17:08:54 |
Message-ID: | E1eSQoY-0002KO-Kh@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2017-12-22 17:52:25 | Re: pgsql: Use new overflow aware integer operations. |
Previous Message | Alvaro Herrera | 2017-12-22 16:47:56 | Re: pgsql: Get rid of copy_partition_key |