hstore ?& operator versus mathematics - Mailing list pgsql-hackers

From Tom Lane
Subject hstore ?& operator versus mathematics
Date
Msg-id 28266.1294607425@sss.pgh.pa.us
Whole thread Raw
Responses Re: hstore ?& operator versus mathematics  (David Fetter <david@fetter.org>)
List pgsql-hackers
hstore's "hstore ?& text[]" operator is defined as "contains all", ie,
it will return true if all the key names found in the text array are
present in the hstore.

ISTM that a sane definition of this operator would provide that if the
array is empty, it returns true: every set contains the empty set.
However, the code goes out of its way to return false instead.

Perhaps this was done intentionally because there was no way to make
GIN index searches work compatibly ... but now there is, so I see no
reason to remain bug-compatible with this behavior.

Barring objections, I'm going to fix it.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: GiST insert algorithm rewrite
Next
From: Noah Misch
Date:
Subject: ALTER TYPE 0: Introduction; test cases