Re: How to add locale support for each column? - Mailing list pgsql-hackers

From Stephan Szabo
Subject Re: How to add locale support for each column?
Date
Msg-id 20040919121432.Y36412@megazone.bigpanda.com
Whole thread Raw
In response to Re: How to add locale support for each column?  (Greg Stark <gsstark@mit.edu>)
List pgsql-hackers
On Sun, 19 Sep 2004, Greg Stark wrote:

>
> Dennis Bjorklund <db@zigo.dhs.org> writes:
>
> > Still, we want the final solution to be what the sql standard specify. A
> > function as the proposed is however useful until a standard sql solution
> > is implemented. I've used a similar function for some projects and it have
> > worked well for me also.
>
> I haven't read the standard in this area (and the sections I have read don't
> lead me to think reading this section would be a trivial task), but from what
> I've seen people describe here I think the standard behaviour will be nigh
> useless anyway. From what I understand the standard has you declare a locale
> per column. That would mean the entire column can only store strings from a
> single locale.

AFAICT, it's one default collation per column, but you can specify a
collation to use on sorts and groups and comparisons.

I think example statement parts would be like:ORDER BY name COLLATE de_DEWHERE name COLLATE de_DE < 'Smith'WHERE name <
'Smith'COLLATE de_DE
 

There are limitations, like I believe the following is an errorWHERE name COLLATE de_DE < 'Smith' COLLATE en_US
because both have different explicitly given collations.


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: How to add locale support for each column?
Next
From: Tom Lane
Date:
Subject: Re: How to add locale support for each column?