Search Postgresql Archives

Re: Intersection or zero-column queries

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Dec 21, 2017 at 4:53 PM, Victor Yegorov <vyegorov@xxxxxxxxx> 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.

The except case looks like a bug because there should never be more rows returned from the combined query than the upper sub-query returns alone.  Based upon the result of intersect it should in fact return zero rows - unless this one of those null-like scenarios where it is both equal and not equal at the same time...

David J.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux