How to add locale support for each column? - Mailing list pgsql-hackers

From Mahmoud Taghizadeh
Subject How to add locale support for each column?
Date
Msg-id 20040919065340.7389.qmail@web50710.mail.yahoo.com
Whole thread Raw
Responses Re: How to add locale support for each column?  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
I have already this mail to PATCHES mailing list and nobody replied me !!!.,
Hope the hackers  and the developers send their ideas.
 
Qustion: is this approach is suitable for solving the need for locale per column in PostgreSQL ?
 
There is a function I attached to this mail. this function is similar to nls_sort.  this function is written by Karel Zak, I dont know if he had tried to submit this code or not.
 
In this distribution you will find file nls_string.c. It contains the
definition of function nls_string(text, text) which takes a string
parameter and a locale name and returns string describing the ordering.
So you can run

  select * from table order by nls_string(name, 'en_US.UTF-8')

or

  select * from table order by nls_string(name, 'cs_CZ.UTF-8')

or

  select * from table order by nls_string(name, 'C')
 
Lates version is available at:
http://www.fi.muni.cz/~adelton/l10n/postgresql-nls-string/

M. Taghizadeh


Do you Yahoo!?
vote.yahoo.com - Register online to vote today!
Attachment

pgsql-hackers by date:

Previous
From: "Michael Paesold"
Date:
Subject: Re: SAVEPOINT SQL conformance
Next
From: Peter Eisentraut
Date:
Subject: Re: How to add locale support for each column?