On 09/12/2014 11:38 AM, Peter Geoghegan wrote: > To be clear: I don't think that this example is messed up (in > isolation). I think it's the correct behavior. What I find > objectionable is the inconsistency. I believe that this is Alexander's > concern too. Alexander's first example exhibits broken behavior.
Hmmm, oh. Yeah, I see what you mean; PostgreSQL's SQL array behavior is that @> is true if array A contains all of the elements of array B regardless of ordering or repetition. jsonic=# select array[1,2,2] @> array[1,1,2] ; ?column? ---------- t That's consistent with our docs and past behavior. However, this better become a FAQ item, because it's not necessarily the behavior that folks used to JSON but not Postgres will expect. -- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers