Re: Intersection or zero-column queries

From: Victor Yegorov <vyegorov(at)gmail(dot)com>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Intersection or zero-column queries
Date: 2017-12-22 00:08:55
Message-ID: CAGnEbohAYxEXt86+Wi84+dOaPZU=bPfk6wNg6zutt3=fntmskg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2017-12-22 2:03 GMT+02:00 David G. Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>:

> On Thu, Dec 21, 2017 at 4:53 PM, Victor Yegorov <vyegorov(at)gmail(dot)com>
> wrote:
>
>> postgres=# select except select;
>> --
>> (2 rows)
>> postgres=# select intersect all select;
>> --
>> (2 rows)
>>
>> Why is it so?
>> Should this be reported as a bug?.. ;)
>>
>
> ​The intersection case seems correct - one row from each sub-relation is
> returned since ALL is specified and both results as the same.
>

Actually, result will not change with or without `ALL` for both, EXCEPT and
INTERSECT.

Also, intersection should not return more rows, than there're in the
sub-relations.

--
Victor Yegorov

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2017-12-22 00:13:07 Re: Intersection or zero-column queries
Previous Message David G. Johnston 2017-12-22 00:03:35 Re: Intersection or zero-column queries