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? regards, tom lane
SELECT EXISTS (TABLE a EXCEPT TABLE b) OR EXISTS (TABLE b EXCEPT TABLE a) ;
And if a new operator was added (in the same category as UNION and EXCEPT), it could be:SELECT EXISTS (TABLE a XORSET TABLE b) ;
SELECT EXISTS (TABLE a XORSET TABLE b) ;
What about using the = and <> operators in sets? Is the following allowed in the standard?SELECT (TABLE a) <> (TABLE b) ;
What about using the = and <> operators in sets? Is the follow
ing allowed in the standard?SELECT (TABLE a) <> (TABLE b) ;
SELECT (TABLE a) <> (TABLE b) ;
pgsql-hackers by date:
Соглашаюсь с условиями обработки персональных данных