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
Re: [HACKERS] Idea on how to simplify comparing two sets |
Список | 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 по дате отправления: