Re: Per-column collation, work in progress

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: Per-column collation, work in progress
Дата
Msg-id AANLkTimbum+D57BeLbRvq3t5LKa8iO4oLj=vjT+9mRLk@mail.gmail.com
обсуждение исходный текст
Ответ на 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>)
Список pgsql-hackers
Hello

I am playing with your patch now. I found a few issues:

1. It's doesn't work with SQL 92 rules for sortby list. I can
understand so explicit COLLATE using doesn't work, but the implicit
using doesn't work too:

CREATE TABLE foo(a text, b text COLLATE "cs_CZ.UTF8")

SELECT * FROM foo ORDER BY 1 -- produce wrong order

2. Why default encoding for collate is static? There are latin2 for
czech, cs_CZ and cs_CZ.iso88592. So any user with UTF8 has to write
encoding explicitly. But the more used and preferred encoding is UTF8
now. I am thinking so cs_CZ on utf8 database should mean cs_CS.UTF8.

3. postgres=# select to_char(current_date,'tmday') collate "cs_CZ.utf8";to_char
──────────thursday -- bad result
(1 row)

4. is somewhere ToDo for collation implementation?

5.

postgres=# create table xy(a text, b text collate "cs_CZ");
ERROR:  collation "cs_CZ" for current database encoding "UTF8" does not exist

can be there some more friendly message or hint ? like "you cannot to
use a different encoding". This collate is in pg_collates table.

--
patch was applied cleanly and works in very well. Thank you.

Regards

Pavel Stehule


2010/9/15 Peter Eisentraut <peter_e@gmx.net>:
> Following up on my previous patch [0], here is a fairly complete
> implementation of this feature.  The general description and
> implementation outline of the previous message still apply.  This patch
> contains documentation and regression tests, which can serve as further
> explanations.
>
> As this patch touches pretty much everything in the system, there are
> probably countless bugs and bogosities, some of which I have marked with
> FIXME, TODO, etc.  But all the functionality is basically there, so it's
> time someone else gives this a serious examination.
>
> Note: As previously, regression tests only work with "make check
> MULTIBYTE=UTF8" and the feature overall only works on Linux/glibc.
>
> [0]
> http://archives.postgresql.org/message-id/1279045531.32647.14.camel@vanquo.pezone.net
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>
>


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: snapshot generation broken
Следующее
От: Itagaki Takahiro
Дата:
Сообщение: Re: Per-column collation, work in progress