From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
---|---|
To: | Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> |
Cc: | Radek Strnad <radek(dot)strnad(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: WIP patch: Collation support |
Date: | 2008-09-10 10:23:34 |
Message-ID: | 20080910102334.GC27812@svana.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Sep 10, 2008 at 12:51:02PM +0300, Heikki Linnakangas wrote:
> >Since the set of collations isn't exactly denumerable, we need some way
> >to allow the user to specify the collation they want. The only
> >collation PostgreSQL knows about is the C collation. Anything else is
> >user-defined.
>
> Let's just use the name of the OS locale, like we do now. Having a
> pg_collation catalog just moves the problem elsewhere: we'd still need
> something in pg_collation to tie the collation to the OS locale.
There's not a one-to-one mapping between collation and locale name. A
locale name includes information about the charset and a collation may
have paramters like case-sensetivity and pad-attribute which are not
present in the locale name. You need a mapping anyway, which is what
this table is for.
The difference in collation between CHAR() and VARCHAR() is the usual
example here.
> >Long term, the collation is a property of the type, ...
>
> I'm not sure what the SQL spec says about that, but I believe it
> provides syntax and rules for all that.
The spec is quite detailed about and I posted code to do it years ago.
The point is that we don't need to go that far with this patch.
> >But that put us back where we started: every database having the same
> >collation. We're trying to move away from that. Just reindex everything
> >and be done with it.
>
> That's easier said than done, unfortunately.
I don't see an alternative.
Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while
> boarding. Thank you for flying nlogn airlines.
From | Date | Subject | |
---|---|---|---|
Next Message | Zdenek Kotala | 2008-09-10 10:39:42 | using hash index when BETWEEN is specified |
Previous Message | Simon Riggs | 2008-09-10 10:16:11 | Re: Synchronous Log Shipping Replication |