Re: Case-Insensitve Text Comparison - Mailing list pgsql-hackers

From Jeff Davis
Subject Re: Case-Insensitve Text Comparison
Date
Msg-id 1212429392.27538.42.camel@dogma.ljc.laika.com
Whole thread Raw
In response to Re: Case-Insensitve Text Comparison  ("David E. Wheeler" <david@kineticode.com>)
List pgsql-hackers
On Sun, 2008-06-01 at 22:13 -0700, David E. Wheeler wrote:
> What locale is right? If I have a Web app, there could be data in many  
> different languages in a single table/column.

I think the values should be explicitly treated differently. 

It would be nice if you could just typecast, like:
"lower(somevalue::text(fr_CA))"

which would then lowercase according to the fr_CA locale, regardless of
the locale of "somevalue".

Using typmod for localization was brought up here:
http://archives.postgresql.org/pgsql-hackers/2007-06/msg00635.php

Has it been discussed further? I happen to like the idea of the TEXT
type taking a locale as a typmod. No typmod would, of course, fall back
to the cluster setting. And it would throw an exception if the encoding
couldn't represent that locale.

Regards,Jeff Davis



pgsql-hackers by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: Case-Insensitve Text Comparison
Next
From: Josh Berkus
Date:
Subject: Re: Overhauling GUCS