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 9391.1299597684@sss.pgh.pa.us
Whole thread Raw
In response to Re: Theory of operation of collation patch  (Martijn van Oosterhout <kleptog@svana.org>)
Responses Re: Theory of operation of collation patch
List pgsql-hackers
Martijn van Oosterhout <kleptog@svana.org> writes:
> This phase of processing happens in the parse analysis, the end result
> being that every expression should have a collation set, and every
> operator where it matters has consistant collation information for its
> arguments. So at this point the collation should be attached to the
> expression.

Right.

> I havn't looked at the patch, perhaps it confuses the information in
> the two phases but the basic idea seems to me:

> - parse analysis - collation in expressions
> - planning - collation in path key

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.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Adrian von Bidder
Date:
Subject: Re: Beginner question: Hacking environment?
Next
From: Merlin Moncure
Date:
Subject: Re: Beginner question: Hacking environment?