Re: Set locale per query? - Mailing list pgsql-general

From Tom Lane
Subject Re: Set locale per query?
Date
Msg-id 16016.1096994733@sss.pgh.pa.us
Whole thread Raw
In response to Set locale per query?  ("Rigmor Ukuhe" <rigmor.ukuhe@finestmedia.com>)
List pgsql-general
"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

pgsql-general by date:

Previous
From: "Dann Corbit"
Date:
Subject: Re: Random not so random
Next
From: "Dann Corbit"
Date:
Subject: Re: Random not so random