Re: Intersection or zero-column queries
От | David G. Johnston |
---|---|
Тема | Re: Intersection or zero-column queries |
Дата | |
Msg-id | CAKFQuwZ+5retWrniZh+NokvV_+Fc0mjRqZ5Xn-Ly-a4M1o6vRw@mail.gmail.com обсуждение исходный текст |
Ответ на | Intersection or zero-column queries (Victor Yegorov <vyegorov@gmail.com>) |
Ответы |
Re: Intersection or zero-column queries
|
Список | pgsql-general |
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.
В списке pgsql-general по дате отправления: