Re: Partial match in GIN

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Teodor Sigaev" <teodor(at)sigaev(dot)ru>
Cc: "Patches" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Partial match in GIN
Date: 2008-04-08 13:25:52
Message-ID: 87tzic4gwv.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

"Teodor Sigaev" <teodor(at)sigaev(dot)ru> writes:

> - compare function has third (optional) argument, of boolean type, it points to
> kind of compare: partial or exact match. If argument is equal to 'false',
> function should produce comparing as usual, else function's result is
> treated as:
> = 0 - match
> < 0 - doesn't match but continue scan
> > 0 - stop scan

Perhaps a minor point but I think this would be cleaner as a separate opclass
function with a separate support number rather than overloading the comparison
function.

Then if the support function is there it supports that type of scan and if it
doesn't then it doesn't, rather than depending on a magic third argument to
completely change behaviour.

You can always share code using an internal function or if the behaviour is
identical just register the same function twice.

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's Slony Replication support!

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2008-04-08 16:59:56 Re: [PATCHES] libpq type system 0.9a
Previous Message Gregory Stark 2008-04-08 12:23:13 Re: Indexam API changes