Re: dangers of setlocale() in backend (was: problem with float8 input format) - Mailing list pgsql-general

From Tom Lane
Subject Re: dangers of setlocale() in backend (was: problem with float8 input format)
Date
Msg-id 23129.966100201@sss.pgh.pa.us
Whole thread Raw
In response to dangers of setlocale() in backend (was: problem with float8 input format)  (Louis-David Mitterrand <cunctator@apartia.ch>)
List pgsql-general
Louis-David Mitterrand <cunctator@apartia.ch> writes:
>> IMPORTANT: changing the backend's locale on-the-fly is an EXTREMELY
>> DANGEROUS thing to do, and I strongly recommend that you find another
>> way to solve your problem.

> The "problem" I am trying to solve is to send e-mail notifications to
> auction bidders in their own language with the proper number formatting,
> etc. From what you are saying I'll probably have to move these
> notifications to the mod_perl layer of the application.

Well, you could fork a subprocess to issue the mail and change locale
only once you're safely inside the subprocess.

            regards, tom lane

pgsql-general by date:

Previous
From: "Byron Nikolaidis"
Date:
Subject: Re: ClassNotFoundException
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Optimizer confusion?