Re: Per-column collation, the finale
Peter Eisentraut <peter_e@gmx.net>
From: Peter Eisentraut <peter_e@gmx.net>
To: Thom Brown <thom@linux.com>
Cc: Noah Misch <noah@leadboat.com>, pgsql-hackers@postgresql.org
Date: 2011-02-09T16:53:43Z
Lists: pgsql-hackers
On tis, 2011-02-08 at 22:17 +0000, Thom Brown wrote: > postgres=# create table meow (id serial, stuff text collate "de_XX"); > NOTICE: CREATE TABLE will create implicit sequence "meow_id_seq" for > serial column "meow.id" > ERROR: collation "de_XX" for current database encoding "UTF8" does not exist > LINE 1: create table meow (id serial, stuff text collate "de_XX"); > > I wouldn't expect to see that first notice. Shouldn't that step come > a bit later? This isn't much different from writing create table meow (id serial, stuff nonsense); You'll still get the notice before it errors out on type-not-found. > A bit of weirdness, I'm allowed to specify more than one collation on > a single column ordering... > Is this the same principal as casting, where they can be chained? > Which one wins in this case? Yeah, last one wins. > Also, if a locale is installed after initdb, is it then impossible to > get pg_collate to pick up that new locale? Currently, you can insert it yourself into pg_collation. I have a CREATE COLLATION patch in the works. > If a locale is somehow > removed from the system, what happens on the database side when > attempting to use a collated column? Then you're hosed, but that has always been the case, with per-cluster and per-database locales.