Re: For review: Initial support for COLLATE - Mailing list pgsql-patches

From Martijn van Oosterhout
Subject Re: For review: Initial support for COLLATE
Date
Msg-id 20050908060433.GA4045@svana.org
Whole thread Raw
In response to Re: For review: Initial support for COLLATE  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: For review: Initial support for COLLATE  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-patches
On Thu, Sep 08, 2005 at 12:04:42AM +0200, Peter Eisentraut wrote:
> Martijn van Oosterhout wrote:
> > Look at the POSIX interface, look at ICU. They both provide collate
> > order *and* date/time formats *and* number formatting. Pretending
> > they're seperate is silly.
>
> I'm not pretending.  They *are* separate.  That's why you can set them
> separately.

They're provided by the same library and set using the same interface.
Currently LC_COLLATE is fixed for the database, but LC_TIME and
LC_NUMERIC can vary between queries. For COLLATE support you need to be
able to specify a different LC_COLLATE for different parts of the
query, this provides that. The POSIX interface isn't flexible enough
for that.

To support COLLATE PostgreSQL's locale support needs to be upgraded and
made more flexible. This is not a surprise. Anything that doesn't use
the new interface isn't affected. I'm a little confused where the
problem is.

If you're worried about functions using the COLLATE tag for something
else, well then we won't do that. Each function/operator decides for
itself whether it's meaningful for them or not...
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Attachment

pgsql-patches by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: For review: Initial support for COLLATE
Next
From: Peter Eisentraut
Date:
Subject: Re: For review: Initial support for COLLATE