On Thu, Feb 26, 2004 at 09:16:03AM -0500, Tom Lane wrote:
> Karel Zak <[EMAIL PROTECTED]> 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
I don't think so. There is setlocale() to original locales before
elog(). But important is idea of this function. We can rewrite it to
fix some minor problems...
> 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?
Yes, speed can be problem. I will test it. But I hope libc read locales
one time only. The common usage is with SELECT where you apply same
locales to all lines of result.
> I think the ultimate solution to our multi-locale problems will have to
> involve abandoning the C library's support functions and writing locale
Yes, but I think nls_string() is nice solution for now. Butter than say
"no way"... :-)
Karel
--
Karel Zak <[EMAIL PROTECTED]>
http://home.zf.jcu.cz/~zakkr/
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend