Re: Per-column collation - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Per-column collation
Date
Msg-id 1289939428.31200.36.camel@vanquo.pezone.net
Whole thread Raw
In response to Re: Per-column collation  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: Per-column collation
List pgsql-hackers
On tis, 2010-11-16 at 20:59 +0100, Pavel Stehule wrote:
> 2010/11/16 Peter Eisentraut <peter_e@gmx.net>:
> > On tis, 2010-11-16 at 20:00 +0100, Pavel Stehule wrote:
> >> yes - my first question is: Why we need to specify encoding, when only
> >> one encoding is supported? I can't to use a cs_CZ.iso88592 when my db
> >> use a UTF8 - btw there is wrong message:
> >>
> >> yyy=# select * from jmena order by jmeno collate "cs_CZ.iso88592";
> >> ERROR:  collation "cs_CZ.iso88592" for current database encoding
> >> "UTF8" does not exist
> >> LINE 1: select * from jmena order by jmeno collate "cs_CZ.iso88592";
> >>                                            ^
> >
> > Sorry, is there some mistake in that message?
> >
> 
> it is unclean - I expect some like "cannot to use collation
> cs_CZ.iso88502, because your database use a utf8 encoding".

No, the namespace for collations is per encoding.  (This is per SQL
standard.)  So you *could* have a collation called "cs_CZ.iso88502" for
the UTF8 encoding.

> I have not a problem with size. Just I think, current behave isn't
> practical. When database encoding is utf8, then I except, so "cs_CZ"
> or "czech" will be for utf8. I understand, so template0 must have a
> all locales, and I understand why current behave is, but it is very
> user unfriendly. Actually, only old application in CR uses latin2,
> almost all uses a utf, but now latin2 is preferred. This is bad and
> should be solved.

Again, we can only look at the locale names that the operating system
gives us.  Mapping that to the names you expect is an AI problem.  If
you have a solution, please share it.




pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: unlogged tables
Next
From: Peter Eisentraut
Date:
Subject: Re: Per-column collation