Re: Per-column collation, the finale

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Per-column collation, the finale
Дата
Msg-id 1297270423.23596.3.camel@vanquo.pezone.net
обсуждение исходный текст
Ответ на Re: Per-column collation, the finale  (Thom Brown <thom@linux.com>)
Список 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.




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Remove more SGML tabs.
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Sync Rep for 2011CF1