Re: Per-column collation, work in progress

Поиск
Список
Период
Сортировка
Искать
От
Greg Stark
Тема
Re: Per-column collation, work in progress
Дата
Msg-id
AANLkTimb3+_E7=3o9u6_GEV7V3w=FmRMroSgw60SNWrJ@mail.gmail.com
Ответ на
Список
Дерево обсуждения
Per-column collation, work in progress Peter Eisentraut <peter_e@gmx.net>
Re: Per-column collation, work in progress Pavel Stehule <pavel.stehule@gmail.com>
Re: Per-column collation, work in progress Greg Stark <gsstark@mit.edu>
Re: Per-column collation, work in progress Andrew Dunstan <andrew@dunslane.net>
Re: Per-column collation, work in progress Pavel Stehule <pavel.stehule@gmail.com>
Re: Per-column collation, work in progress Peter Eisentraut <peter_e@gmx.net>
Re: Per-column collation, work in progress Pavel Stehule <pavel.stehule@gmail.com>
Re: Per-column collation, work in progress Peter Eisentraut <peter_e@gmx.net>
Re: Per-column collation, work in progress Pavel Stehule <pavel.stehule@gmail.com>
Re: Per-column collation, work in progress Itagaki Takahiro <itagaki.takahiro@gmail.com>
Re: Per-column collation, work in progress Peter Eisentraut <peter_e@gmx.net>
Re: Per-column collation, work in progress Pavel Stehule <pavel.stehule@gmail.com>
Re: Per-column collation, work in progress Itagaki Takahiro <itagaki.takahiro@gmail.com>
Re: Per-column collation, work in progress Peter Eisentraut <peter_e@gmx.net>
Re: Per-column collation, work in progress Itagaki Takahiro <itagaki.takahiro@gmail.com>
Re: Per-column collation, work in progress Peter Eisentraut <peter_e@gmx.net>
Re: Per-column collation, work in progress Robert Haas <robertmhaas@gmail.com>
Re: Per-column collation, work in progress Peter Eisentraut <peter_e@gmx.net>
Re: Per-column collation, work in progress Robert Haas <robertmhaas@gmail.com>
Re: Per-column collation, work in progress Peter Eisentraut <peter_e@gmx.net>
Re: Per-column collation, work in progress Tom Lane <tgl@sss.pgh.pa.us>
Re: Per-column collation, work in progress Robert Haas <robertmhaas@gmail.com>
Re: Per-column collation, work in progress Tom Lane <tgl@sss.pgh.pa.us>
Re: Per-column collation, work in progress Josh Berkus <josh@agliodbs.com>
Re: Per-column collation, work in progress Robert Haas <robertmhaas@gmail.com>
Re: Per-column collation, work in progress Peter Eisentraut <peter_e@gmx.net>
Re: Per-column collation, work in progress Robert Haas <robertmhaas@gmail.com>
Re: Per-column collation, work in progress Peter Eisentraut <peter_e@gmx.net>
On Sun, Sep 26, 2010 at 1:15 PM, Pavel Stehule  wrote:
> Is there any reason why you prohibit a different encodings per one
> database? Actually people expect from collate per column a possibility
> to store a two or more different encodings per one database.

These are two completely separate problems that only look related. The
main difference is that while collation is a property of the
comparison or sort you're performing encoding is actually a property
of the string itself. It doesn't make sense to specify a different
encoding than what the string actually contains.

You could actually do what you want now by using bytea columns and
convert_to/convert_from and it wouldn't be much easier if the support
were built into text since you would still have to keep track of the
encoding it's in and the encoding you want. We could have a
encoded_text data type which includes both the encoding and the string
and which any comparison function automatically handles conversion
based on the encoding of the collation requested -- but I wouldn't
want that to be the default text datatype. It would impose a lot of
overhead on the basic text operations and magnify the effects of
choosing the wrong collation.

-- 
greg

В списке pgsql-hackers по дате отправления
От: Pavel Stehule
Дата:
От: Andrew Dunstan
Дата:
FAQ