Re: Theory of operation of collation patch

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
Cc: 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 15:21:24
Message-ID: 9391.1299597684@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Martijn van Oosterhout <kleptog(at)svana(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Merlin Moncure 2011-03-08 15:23:13 Re: Beginner question: Hacking environment?
Previous Message Adrian von Bidder 2011-03-08 15:17:51 Re: Beginner question: Hacking environment?