Set locale per query?

Started by Rigmor Ukuheover 21 years ago2 messagesgeneral
Jump to latest
#1Rigmor Ukuhe
rigmor.ukuhe@finestmedia.com

Hi,

Is there a way to set locale per query (i use latest JDBC drivers). I am in
situation, where we need to make ORDER BY querys over data that is in
various langages - English, Russian, Estonian, Latvian. I know that there
are issues with indexing that column in such case, but what are my options
other then sort results in my program manally.

Rigmor Ukuhe

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.770 / Virus Database: 517 - Release Date: 27.09.2004

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Rigmor Ukuhe (#1)
Re: Set locale per query?

"Rigmor Ukuhe" <rigmor.ukuhe@finestmedia.com> writes:

Is there a way to set locale per query (i use latest JDBC drivers). I am in
situation, where we need to make ORDER BY querys over data that is in
various langages - English, Russian, Estonian, Latvian. I know that there
are issues with indexing that column in such case, but what are my options
other then sort results in my program manally.

There's no support for that in the standard backend. If you check in
the list archives, someone has posted a sorting function that takes
locale as one argument --- not sure about efficiency but it might do as
a stopgap. I believe it was last posted just a couple weeks ago in
-patches or -hackers.

regards, tom lane