Skip site navigation (1) Skip section navigation (2)

Re: ORDER BY different locales

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ORDER BY different locales
Date: 2004-02-26 14:16:03
Message-ID: 11784.1077804963@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-hackers
Karel Zak <zakkr(at)zf(dot)jcu(dot)cz> writes:
>  I  think possible  solution is  special function  used ORDER  BY clause
>  which knows to switch by safe  way to wanted locales, convert string by
>  strxfrm() and switch back to backend locales.

This function breaks the whole backend if an elog() failure occurs while
it's got the wrong locale set.  I believe it would also be remarkably
slow --- doesn't setlocale() involve reading a new locale definition
file from whereever those are stored?

I think the ultimate solution to our multi-locale problems will have to
involve abandoning the C library's support functions and writing locale
support that allows multiple locale-defining structures referenced by
pointers.  It's a big task though :-(.  Peter was looking at it awhile
back but I don't know how far he's gotten.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Karel ZakDate: 2004-02-26 14:45:43
Subject: Re: ORDER BY different locales
Previous:From: Tom LaneDate: 2004-02-26 13:54:59
Subject: Re: Check Constraints and pg_dump

pgsql-general by date

Next:From: Karam ChandDate: 2004-02-26 14:18:57
Subject: Index Information
Previous:From: Tom LaneDate: 2004-02-26 14:07:42
Subject: Re: help using arrays in a function

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group