Re: WIP patch: Collation support - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Re: WIP patch: Collation support
Date
Msg-id 20080902155727.GF3664@svana.org
Whole thread Raw
In response to Re: WIP patch: Collation support  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: WIP patch: Collation support  (Gregory Stark <stark@enterprisedb.com>)
List pgsql-hackers
On Tue, Sep 02, 2008 at 04:46:16PM +0300, Peter Eisentraut wrote:
> >While it's true POSIX locales don't handle this, other collation
> >libraries do and we should support them if the user wants.
>
> Do they handle exactly those two attributes specifically?  Can you point
> out references?  Or do you mean, other collation libraries allow their
> collations to be configured/customized?  I think linguistically it is a
> very narrow view of the world to hardcode those two attributes.

Well, yes. Accents and case are attributes of a character. (I'm using
the unicode model here). So, to do a case insensetive match you take
the characters, strip the attributes and then do the comparison. There
are specialised routines which handle the denormalisation of the string
for you so in theory you could even get specific about which accents
you ignore. In practice I don't think people do that.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while
> boarding. Thank you for flying nlogn airlines.

pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: What is d2mdir?
Next
From: "David E. Wheeler"
Date:
Subject: Re: Mysterious Bus Error with get_fn_expr_argtype()