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

From Pavel Stehule
Subject Re: Per-column collation
Date
Msg-id AANLkTimT6vduvObrg1DaQYtFKnaX6iqq_gubxgSPerPh@mail.gmail.com
Whole thread Raw
In response to Re: Per-column collation  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: Per-column collation
List pgsql-hackers
Hello

2010/11/15 Peter Eisentraut <peter_e@gmx.net>:
> On mån, 2010-11-15 at 11:34 +0100, Pavel Stehule wrote:
>> I am checking a patch. I found a problem with initdb
>
> Ah, late night brain farts, it appears.  Here is a corrected version.
>
>

yes, it's ok now.

I see still a few issues:

a) default encoding for collate isn't same as default encoding of database

it's minimally not friendly - mostly used encoding is UTF8, but in
most cases users should to write locale.utf8.

b) there is bug - default collate (database collate is ignored)


postgres=# show lc_collate;lc_collate
────────────cs_CZ.UTF8
(1 row)

Time: 0.518 ms
postgres=# select * from jmena order by v;    v
───────────ChromečkaCrhaDrobnýČečetka
(4 rows)

postgres=# select * from jmena order by v collate "cs_CZ.utf8";    v
───────────CrhaČečetkaDrobnýChromečka
(4 rows)

both result should be same.

isn't there problem in case sensitive collate name? When I use a
lc_collate value, I got a error message

postgres=# select * from jmena order by v collate "cs_CZ.UTF8";
ERROR:  collation "cs_CZ.UTF8" for current database encoding "UTF8"
does not exist
LINE 1: select * from jmena order by v collate "cs_CZ.UTF8";

problem is when table is created without explicit collate.

Regards

Pavel Stehule


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [COMMITTERS] pgsql: Improved parallel make support
Next
From: Itagaki Takahiro
Date:
Subject: Re: How to rename each field in ROW expression?