Re: Per-column collation, the finale

From: Thom Brown <thom(at)linux(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Noah Misch <noah(at)leadboat(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Per-column collation, the finale
Date: 2011-02-08 22:17:59
Message-ID: AANLkTin0wzbrO-uzWRFeSdzwWPXO9EUWCM0wY3BMmtxb@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 8 February 2011 21:08, Peter Eisentraut <peter_e(at)gmx(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jan Urbański 2011-02-08 22:35:06 Re: REVIEW: PL/Python table functions
Previous Message Dimitri Fontaine 2011-02-08 22:07:11 Re: Extensions versus pg_upgrade