Re: Intersection or zero-column queries

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: "David G. Johnston" <david.g.johnston@gmail.com>
Cc: Victor Yegorov <vyegorov@gmail.com>, "pgsql-general@postgresql.org" <pgsql-general@postgresql.org>
Date: 2017-12-22T17:11:35Z
Lists: pgsql-general
I wrote:
> "David G. Johnston" <david.g.johnston@gmail.com> writes:
>> How about just erroring out?

> Hm, yeah, inserting a FEATURE_NOT_SUPPORTED error might be an
> appropriate amount of effort.

When I looked into this more closely, it turns out that in v10/HEAD
it takes less code to fix it than to throw an error ;-).  So I just
fixed it and added some regression tests.  But 9.6 blows up somewhere
in the executor, and it didn't seem worth trying to deal with that.
So in 9.4-9.6 I just made the case throw an error.

			regards, tom lane


Commits

  1. Disallow UNION/INTERSECT/EXCEPT over no columns.

  2. Fix UNION/INTERSECT/EXCEPT over no columns.