Re: Per-column collation, proof of concept

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Per-column collation, proof of concept
Date: 2010-07-15 08:44:26
Message-ID: 1279183466.28822.11.camel@fsopti579.F-Secure.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On tor, 2010-07-15 at 05:57 +0200, Pavel Stehule wrote:
> :( maybe we have to enhance a locales - or do some work in this way.
> In Czech's IS is relative often operation some like
>
> name = 'Stěhule' COLLATION cs_CZ_cs_ai -- compare case insensitive
> accent insensitive
>
> PostgreSQL is last db, that doesn't integreated support for it

Well, the comparison function varstr_cmp() contains this comment:

/*
* In some locales strcoll() can claim that nonidentical strings are
* equal. Believing that would be bad news for a number of reasons,
* so we follow Perl's lead and sort "equal" strings according to
* strcmp().
*/

This might not be strictly necessary, seeing that citext obviously
doesn't work that way, but resolving this is really an orthogonal issue.
If you fix that and you have a locale that does what you want, my patch
will help you get your example working.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2010-07-15 09:24:27 Re: ALTER TABLE SET STATISTICS requires AccessExclusiveLock
Previous Message Markus Wanner 2010-07-15 06:58:01 Re: cvs to git migration - keywords