Re: New approach to ye olde cross-datatype indexing problem - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: New approach to ye olde cross-datatype indexing problem
Date
Msg-id Pine.LNX.4.44.0311081735500.11030-100000@peter.localdomain
Whole thread Raw
In response to New approach to ye olde cross-datatype indexing problem  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: New approach to ye olde cross-datatype indexing problem  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane writes:

> Here's what I'm thinking of: specify that the "input" datatype of an
> operator class (pg_opclass.opcintype) is actually just the type of the
> indexed column.  Operators that are members of the opclass must take this
> type as their left-hand input, but the right-hand input can be some other
> type.  pg_amop gets an additional column that is the right-hand data type
> of the operator, and its primary key becomes (opclass, righthandtype,
> strategy) rather than just (opclass, strategy).

Yes, that looks to be the right way.

> One way in which we will lose some flexibility is that this design nails
> down forevermore the assumption that the indexed column is on the lefthand
> side of any indexable clause.

I don't see this as a problem, but if it becomes one we can relabel "left
operand" as "indexed operand" and "right operand" as "variable operand",
and add a boolean flag telling which is right and left.

-- 
Peter Eisentraut   peter_e@gmx.net



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: New approach to ye olde cross-datatype indexing problem
Next
From: Tom Lane
Date:
Subject: Re: New approach to ye olde cross-datatype indexing problem