Re: ORDER BY different locales - Mailing list pgsql-hackers

From Greg Stark
Subject Re: ORDER BY different locales
Date
Msg-id 87oerlh8yw.fsf@stark.xeocode.com
Whole thread Raw
In response to Re: ORDER BY different locales  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.us> writes:

> 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 posted a similar function a while back using strxfrm and someone else
refined to eliminate a similar problem with elog(). I tested the speed under
glibc and it blazingly fast. I think the time difference was hardly even
noticeable over any other string function.

Certainly I expect there would be some platforms that would perform poorly,
but then there are lots of things various platforms do poorly. I don't think
that means postgres should reimplement everything itself for consistency. That
way lies Oracle.

-- 
greg



pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: [pgsql-www] Collaboration Tool Proposal
Next
From: Andrew Dunstan
Date:
Subject: Re: [pgsql-www] Collaboration Tool Proposal