Re: Per-column collation, the finale

Поиск
Список
Период
Сортировка
От Thom Brown
Тема Re: Per-column collation, the finale
Дата
Msg-id AANLkTin0wzbrO-uzWRFeSdzwWPXO9EUWCM0wY3BMmtxb@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Per-column collation, the finale  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: Per-column collation, the finale  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
On 8 February 2011 21:08, Peter Eisentraut <peter_e@gmx.net> wrote:
> On tor, 2011-02-03 at 18:36 -0500, Noah Misch wrote:
>> Looks good and tests well.  I've attached the same benchmark script
>> with updated timings, and I've marked the patch Ready for Committer.
>
> Committed.  Thanks everyone.

Awesome work Peter.  Few questions:

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?

A bit of weirdness, I'm allowed to specify more than one collation on
a single column ordering...

postgres=# select * from meow order by stuff collate "en_GB" collate
"de_DE" desc;id | stuff
----+------- 2 | meow2 1 | meow
(2 rows)

Is this the same principal as casting, where they can be chained?
Which one wins in this case?  Although if anyone is actually doing
this, then it's just silly anyway. (says Thom having just done it)

Also, if a locale is installed after initdb, is it then impossible to
get pg_collate to pick up that new locale?  If a locale is somehow
removed from the system, what happens on the database side when
attempting to use a collated column? (I don't wish to TIAS on my own
system)

--
Thom Brown
Twitter: @darkixion
IRC (freenode): dark_ixion
Registered Linux user: #516935


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

Предыдущее
От: Dimitri Fontaine
Дата:
Сообщение: Re: Extensions versus pg_upgrade
Следующее
От: Jan Urbański
Дата:
Сообщение: Re: REVIEW: PL/Python table functions