Intersection or zero-column queries
Victor Yegorov <vyegorov@gmail.com>
From: Victor Yegorov <vyegorov@gmail.com>
To: pgsql-general@postgresql.org
Date: 2017-12-21T23:53:35Z
Lists: pgsql-general
Greetings.
One can issue an empty `SELECT` statement and 1 row without columns will be
returned:
postgres=# select;
--
(1 row)
However, if I'll do `EXCPET` or `INTERSECT` of such queries, I'll get 2
rows:
postgres=# select except select;
--
(2 rows)
postgres=# select intersect all select;
--
(2 rows)
Why is it so?
Should this be reported as a bug?.. ;)
--
Victor Yegorov
Commits
-
Disallow UNION/INTERSECT/EXCEPT over no columns.
- e1b8e0e4a61e 9.4.16 landed
- a84e90bb249d 9.5.11 landed
- bd29bc417e71 9.6.7 landed
-
Fix UNION/INTERSECT/EXCEPT over no columns.
- c252ccda7429 10.2 landed
- c4c2885cbb18 11.0 landed