Re: [HACKERS] Idea on how to simplify comparing two sets

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: [HACKERS] Idea on how to simplify comparing two sets
Дата
Msg-id CAKFQuwZqUEkfpXQsMnYBGKb24h3TCXoTToA63BQr3EcMwx5uuQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Idea on how to simplify comparing two sets  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [HACKERS] Idea on how to simplify comparing two sets  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Tue, Feb 7, 2017 at 8:58 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Joel Jacobson <joel@trustly.com> writes:
> Currently there is no simple way to check if two sets are equal.

Uh ... maybe check whether SELECT set1 EXCEPT SELECT set2
and SELECT set2 EXCEPT SELECT set1 are both empty?

​SELECT set1 FULL EXCEPT SELECT set2 ?

Matches with the concept and syntax of "FULL JOIN"​.

or

SELECT set1 XOR SELECT set2

That said I'm not sure how much we want to go down this road on our own.  It'd be nice to have when its needed but its not something that gets much visibility on these lists to suggest a large pent-up demand.

IS NOT DISTINCT FROM doesn't imply bi-direction any better than EXCEPT does ... if we are going to add new syntax I'd say it should at least do that.

David J.

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: [HACKERS] Press Release Draft - 2016-02-09 Cumulative Update
Следующее
От: Erik Rijkers
Дата:
Сообщение: Re: [HACKERS] Cache Hash Index meta page.