From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Greg Stark <gsstark(at)mit(dot)edu> |
Cc: | Martijn van Oosterhout <kleptog(at)svana(dot)org>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Theory of operation of collation patch |
Date: | 2011-03-08 18:31:37 |
Message-ID: | 23898.1299609097@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Greg Stark <gsstark(at)mit(dot)edu> writes:
> On Tue, Mar 8, 2011 at 3:21 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Not so right. A path key contains an expression tree, plus whatever
>> *additional* information is needed to fully specify the sort ordering.
>> If the collation is already fully determined by the expression tree,
>> there is no need to duplicate that information in the PathKey node.
>> And, as I said, doing so anyway has real negative consequences.
> Isn't the reason to copy that information outside the expression so
> that we can choose sometimes to ignore it? Namely, for == we can use
> an index with any defined collation even if it doesn't match the
> collation in the pathkey we're looking for?
No, that's nonsense. A PathKey is all about sort order. It is not
relevant in any situation where sort order is ignorable.
> I think currently that's the only example but in theory we could have
> collations that are "supersets" of the desired collation. For example
> a UTF8 collation that sorts english in the desired way and sorts utf8
> characters in some way that isn't relevant to the query.
That sounds like nonsense as well. There is no such thing as a superset
ordering: to have such a thing, you'd have to have some orderings that
didn't fully determine the ordering of data values, which is pretty much
unworkable.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2011-03-08 18:33:06 | Re: Beginner question: Hacking environment? |
Previous Message | Greg Stark | 2011-03-08 18:26:57 | Re: Theory of operation of collation patch |