From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Per-column collation, work in progress |
Date: | 2010-09-23 08:12:32 |
Message-ID: | AANLkTimbum+D57BeLbRvq3t5LKa8iO4oLj=vjT+9mRLk@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)gmx(dot)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(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Itagaki Takahiro | 2010-09-23 08:29:45 | Re: Per-column collation, work in progress |
Previous Message | Peter Eisentraut | 2010-09-23 08:07:53 | Re: snapshot generation broken |