Re: [HACKERS] contrib/intarray vs empty arrays

2009-04-09 Thread Teodor Sigaev
While I was testing this I realized that I wasn't getting quite the same answers :-(. In particular, it seems that the core operators consider an empty array to be contained in anything else, while intarray will only return true for two nonempty arrays. Urgh. We (with Oleg) digged a bit around

Re: [HACKERS] contrib/intarray vs empty arrays

2009-04-09 Thread Greg Stark
2009/4/9 Teodor Sigaev teo...@sigaev.ru: contains - all elements of second array are contained in the first one. Empty array has no element, so it can't be contained. That sounds wrong. A contains B should surely always be true if B is empty. ie for all x, x in B implies x in A. Or put another

[HACKERS] contrib/intarray vs empty arrays

2009-04-04 Thread Tom Lane
I just got rid of the contrib/intarray duplicates of @ and @, as we discussed here: http://archives.postgresql.org/message-id/17021.1234474...@sss.pgh.pa.us While I was testing this I realized that I wasn't getting quite the same answers :-(. In particular, it seems that the core operators

Re: [HACKERS] contrib/intarray vs empty arrays

2009-04-04 Thread Andrew Gierth
Tom == Tom Lane t...@sss.pgh.pa.us writes: [empty arrays and containment ops] Tom From what I understand of GIN's internal workings, this is Tom unfixable because there is nothing to make an index entry on Tom when looking at an empty array. Unless you know of a trick to Tom get around