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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] Idea on how to simplify comparing two sets
Дата
Msg-id 6491.1486490594@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] Idea on how to simplify comparing two sets  ("David G. Johnston" <david.g.johnston@gmail.com>)
Ответы Re: [HACKERS] Idea on how to simplify comparing two sets  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Re: [HACKERS] Idea on how to simplify comparing two sets  (Nico Williams <nico@cryptonector.com>)
Список pgsql-hackers
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> 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"​.

Actually ... now that you mention full join, I believe this works:

select * from (select ...) s1 full join (select ...) s2 on ((s1.*)=(s2.*)) where s1.* is distinct from s2.*;

> 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.

Yeah, if this isn't in the standard and not in other databases either,
that would seem to suggest that it's not a big requirement.
        regards, tom lane



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

Предыдущее
От: Pavan Deolasee
Дата:
Сообщение: Re: [HACKERS] [COMMITTERS] pgsql: Release note updates.
Следующее
От: Fabien COELHO
Дата:
Сообщение: Re: [HACKERS] Idea on how to simplify comparing two sets