Re: [HACKERS] Idea on how to simplify comparing two sets - Mailing list pgsql-hackers

From Joel Jacobson
Subject Re: [HACKERS] Idea on how to simplify comparing two sets
Date
Msg-id CAASwCXdmcJrvuhJDUX1GK+PX=Xp+pzRavBPWtvp8AhXGPfpnJQ@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Idea on how to simplify comparing two sets  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [HACKERS] Idea on how to simplify comparing two sets  (Merlin Moncure <mmoncure@gmail.com>)
List pgsql-hackers
On Tue, Feb 7, 2017 at 4:58 PM, 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?

Yes, that's one way, but it's ugly as you have to repeat yourself and
write both sets two times.
Not an issue for small queries, but if you have two big queries stored
in a .sql file,
you would have to modify both places for each query and always make
sure they are identical.



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: [HACKERS] [COMMITTERS] pgsql: Release note updates.
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] [PATCH] configure-time knob to set default ssl ciphers