How to add locale support for each column?

From: Mahmoud Taghizadeh <m_taghi(at)yahoo(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: How to add locale support for each column?
Date: 2004-09-19 06:53:40
Message-ID: 20040919065340.7389.qmail@web50710.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

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 Content-Type Size
postgresql-nls-string-0.53.tar.gz application/x-gzip 3.9 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2004-09-19 08:45:39 Re: How to add locale support for each column?
Previous Message Michael Paesold 2004-09-18 21:46:52 Re: SAVEPOINT SQL conformance

Browse pgsql-patches by date

  From Date Subject
Next Message LELARGE Guillaume 2004-09-19 08:29:32 Re: French translation updates for 7.4 and 7.5
Previous Message Tom Lane 2004-09-18 20:46:16 Re: libpq and prepared statements progress for 8.0