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

From Greg Stark
Subject Re: Theory of operation of collation patch
Date
Msg-id AANLkTiks8iKjGjmqVCQVFYY8AtoJukS5SvJ+HU+y-8OG@mail.gmail.com
Whole thread Raw
In response to Re: Theory of operation of collation patch  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Theory of operation of collation patch
List pgsql-hackers
On Wed, Mar 9, 2011 at 1:52 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Another interesting item ... I see that you added a collation field to
> TypeName, apparently on the grounds that the SQL spec includes collation
> in <data type>.  However, it seems to me that that is nonsense up with
> which we should not put.

The SQL committee has demonstrably awful taste but they're usually not
entirely nutty. Usually whatever they do they had a reason. Is there
any hint at all of what they were trying to accomplish here? When you
say "basically only used in CAST and column definitions" are there
other less common cases where it's convenient?

Or was this just a case of some existing database allowed COLLATE
clauses in column definitions as part of the type and they preferred
to have it in a different syntax so they did this to allow either to
work? If we allow <collate clause> in ColQualList are we covering the
very case they were trying to deal with?

Can you give an example of what a column definition would look like if
you put the COLLATE clause in the <data type> in a way that wouldn't
be parsed according to your plan?

--
greg


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Update of replication/README
Next
From: Bruce Momjian
Date:
Subject: Re: Header comments in the recently added files