| From: | Mahmoud Taghizadeh <m_taghi(at)yahoo(dot)com> |
|---|---|
| To: | pgsql-patches(at)postgresql(dot)org |
| Subject: | Again!! locale per column for postgreSQL |
| Date: | 2004-09-15 14:01:35 |
| Message-ID: | 20040915140135.72510.qmail@web50708.mail.yahoo.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-patches |
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')
M. taghizade
---------------------------------
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2004-09-15 14:18:12 | Re: arrayfuncs: fix read of uninitialized mem |
| Previous Message | Neil Conway | 2004-09-15 09:46:43 | cosmetic pl/pgsql fix |