Re: How to pass around collation information

Поиск
Список
Период
Сортировка
Искать
От
Peter Eisentraut
Тема
Re: How to pass around collation information
Дата
Msg-id
1275507982.3871.7.camel@vanquo.pezone.net
Ответ на
Список
Дерево обсуждения
How to pass around collation information Peter Eisentraut <peter_e@gmx.net>
Re: How to pass around collation information alvherre <alvherre@commandprompt.com>
Re: How to pass around collation information Pavel Stehule <pavel.stehule@gmail.com>
Re: How to pass around collation information Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: How to pass around collation information Peter Eisentraut <peter_e@gmx.net>
Re: How to pass around collation information Peter Eisentraut <peter_e@gmx.net>
Re: How to pass around collation information Robert Haas <robertmhaas@gmail.com>
Re: How to pass around collation information Peter Eisentraut <peter_e@gmx.net>
Re: How to pass around collation information David Christensen <david@endpoint.com>
Re: How to pass around collation information Peter Eisentraut <peter_e@gmx.net>
Re: How to pass around collation information Robert Haas <robertmhaas@gmail.com>
Re: How to pass around collation information Tom Lane <tgl@sss.pgh.pa.us>
Re: How to pass around collation information Peter Eisentraut <peter_e@gmx.net>
Re: How to pass around collation information Martijn van Oosterhout <kleptog@svana.org>
Re: How to pass around collation information Robert Haas <robertmhaas@gmail.com>
Re: How to pass around collation information Peter Eisentraut <peter_e@gmx.net>
Re: How to pass around collation information Robert Haas <robertmhaas@gmail.com>
Re: How to pass around collation information Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: How to pass around collation information Peter Eisentraut <peter_e@gmx.net>
Re: How to pass around collation information Dimitri Fontaine <dfontaine@hi-media.com>
On fre, 2010-05-28 at 20:59 +0300, Peter Eisentraut wrote:
> The feature I'm thinking of is what
> people might call "per-column locale", and the SQL standard defines
> that.  It would look like this:
> 
> CREATE TABLE test (
>     a varchar COLLATE de,
>     b varchar COLLATE fr
> );
> 
> SELECT * FROM test WHERE a > 'baz' ORDER BY b;

Perhaps it's also worth pointing out there could be use cases other than
supporting multiple natural languages.  For example, it is frequently
requested to be able to sort in ways that doesn't ignore special
characters, binary sort, or perhaps special file name sort that treats
'/' special in some way.  So it could be quite useful to be able to say

CREATE TABLE something (   description text COLLATE en,   code char(6) COLLATE binary,   file text COLLATE filename_sort
);

or even something like

CREATE DOMAIN filename AS text COLLATE filename_sort;

These are examples where having the collation attached to the column
would appear to make more sense then having it attached only to
operations.



В списке pgsql-hackers по дате отправления
От: Heikki Linnakangas
Дата:
От: Tom Lane
Дата:
FAQ