Re: contrib/intarray vs empty arrays - Mailing list pgsql-hackers

From Andrew Gierth
Subject Re: contrib/intarray vs empty arrays
Date
Msg-id 87fxgnvi2m.fsf@news-spur.riddles.org.uk
Whole thread Raw
In response to contrib/intarray vs empty arrays  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
>>>>> "Tom" == Tom Lane <tgl@sss.pgh.pa.us> writes:
[empty arrays and containment ops]
Tom> From what I understand of GIN's internal workings, this isTom> unfixable because there is nothing to make an index
entryonTom> when looking at an empty array.  Unless you know of a trick toTom> get around that, we've got a problem
here.

Umm. In theory, could the extract function return some distinct
value when applied to an empty array, and the extract_query function
include the same value when extracting a query?

It's not very clean, since it means that the element type for an
index of sometype[] is no longer sometype, but it would allow the
semantics to be kept consistent.

[whether it is worth the pain of doing this is a separate question]

-- 
Andrew (irc:RhodiumToad)


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: ALTER TABLE ... ALTER COLUMN ... SET DISTINCT
Next
From: abdelhak benmohamed
Date:
Subject: about hacking postgresql