Re: Theory of operation of collation patch - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Theory of operation of collation patch
Date
Msg-id 1017.1299625239@sss.pgh.pa.us
Whole thread Raw
In response to Re: Theory of operation of collation patch  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> On mån, 2011-03-07 at 12:52 -0500, Tom Lane wrote:
>> It looks like indcollation is acting as a
>> substitute for including a CollateClause in the index key expression,
>> which doesn't seem like a particularly good tradeoff considering all
>> the overhead you must introduce into the default case.

> Conceptually, this characterization is correct.  But assuming you do
> away with the indcollation column and instead create expression indexes
> on (col COLLATE "x"), you'd then have an interesting time matching those
> expressions to expressions in the query when choosing an index.

Hmm ... interesting point, but I think it already doesn't work in all
cases for expression indexes.  There is an analogous issue for
binary-compatible datatypes, which we hack around by stripping
RelabelType nodes before doing this type of comparison.  Maybe we'll
have to do something similar with CollateClauses.  I never much cared
for that hack, though ... wonder if there is a cleaner way.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Alpha4 release blockers (was Re: wrapping up this CommitFest)
Next
From: Selena Deckelmann
Date:
Subject: Re: GSoC 2011 - Mentors? Projects?