Re: Per-column collation

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Per-column collation
Date: 2010-11-16 20:30:28
Message-ID: 1289939428.31200.36.camel@vanquo.pezone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On tis, 2010-11-16 at 20:59 +0100, Pavel Stehule wrote:
> 2010/11/16 Peter Eisentraut <peter_e(at)gmx(dot)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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2010-11-16 20:32:01 Re: Per-column collation
Previous Message Peter Eisentraut 2010-11-16 20:26:17 Re: unlogged tables