Intersection or zero-column queries - Mailing list pgsql-general

From Victor Yegorov
Subject Intersection or zero-column queries
Date
Msg-id CAGnEbojGJrRSOgJwNGM7JSJZpVAf8xXcVPbVrGdhbVEHZ-BUMw@mail.gmail.com
Whole thread Raw
Responses Re: Intersection or zero-column queries
Re: Intersection or zero-column queries
List 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

pgsql-general by date:

Previous
From: Melvin Davidson
Date:
Subject: Re: [v10] CREATE TEMP FUNCTION/CREATE FUNCTION PG_TEMP.X
Next
From: "David G. Johnston"
Date:
Subject: Re: Intersection or zero-column queries