Re: Per-column collation, work in progress
Peter Eisentraut <peter_e@gmx.net>
From: Peter Eisentraut <peter_e@gmx.net>
To: Itagaki Takahiro <itagaki.takahiro@gmail.com>
Cc: Pavel Stehule <pavel.stehule@gmail.com>, pgsql-hackers@postgresql.org
Date: 2010-09-23T09:10:01Z
Lists: pgsql-hackers
On tor, 2010-09-23 at 17:29 +0900, Itagaki Takahiro wrote: > On Thu, Sep 23, 2010 at 5:12 PM, Pavel Stehule <pavel.stehule@gmail.com> wrote: > > 5. > > postgres=# create table xy(a text, b text collate "cs_CZ"); > > ERROR: collation "cs_CZ" for current database encoding "UTF8" does not exist > > can be there some more friendly message or hint ? > > I hope Postgres automatically detects the omitted encoding > because it knows the database encoding is UTF8. I would rather not build too many expectations into this yet. The collation names are chosen by the user, the locale names are from the operating system. There is not necessarily a correspondence. The best fix is probably what I described earlier, populate the pg_collation table with the ".utf8" suffix stripped.