Re: contrib/intarray vs empty arrays

From: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
To: tgl(at)sss(dot)pgh(dot)pa(dot)us (Tom Lane), pgsql-hackers(at)postgresql(dot)org
Subject: Re: contrib/intarray vs empty arrays
Date: 2009-04-05 04:29:53
Message-ID: 87fxgnvi2m.fsf@news-spur.riddles.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>>>>> "Tom" == Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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 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)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message abdelhak benmohamed 2009-04-05 07:26:03 about hacking postgresql
Previous Message Tom Lane 2009-04-05 03:14:04 Re: ALTER TABLE ... ALTER COLUMN ... SET DISTINCT