Re: Review: B-Tree emulation for GIN - Mailing list pgsql-hackers

From Jeff Davis
Subject Re: Review: B-Tree emulation for GIN
Date
Msg-id 1238106541.11547.143.camel@dell.linuxdev.us.dell.com
Whole thread Raw
In response to Re: Review: B-Tree emulation for GIN  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Review: B-Tree emulation for GIN  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Wed, 2009-03-25 at 19:31 -0400, Tom Lane wrote:
> * I'd also like to come to some agreement about getting rid of the
> fail-on-NULL-scankey problem in newScanKey().  As I noted in the
> comment there, we could make that work cleanly if we are willing to
> assume that all GIN-indexable operators are strict.  We already assume
> the same for hash and btree operators, so it doesn't seem like a big
> problem to do this, but I wonder if there are any objections.

"IS NULL" is indexable in a btree and non-strict, so there is at least
some precedent.

Also, if extractQuery is non-strict, shouldn't we call it and see if it
returns some useful keys? If so, I don't see a reason to assume that
nothing matches.

If the opclass author wants a search against NULL to mean "matches
nothing", they can just make extractQuery non-strict and return -1.

However, if extractQuery is strict or returns NULL, I'm fine with either
an error or assuming "nothing matches". I don't see a functionality
difference either way, so we should just document whatever seems to make
the most sense.

Regards,Jeff Davis




pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: gettext, plural form and translation
Next
From: Tom Lane
Date:
Subject: Re: "maxretries" option of pg_standby doesn't work as expected