Re: plperl vs LC_COLLATE (was Re: Possible savepoint bug) - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: plperl vs LC_COLLATE (was Re: Possible savepoint bug)
Date
Msg-id 43C16AE0.2080605@dunslane.net
Whole thread Raw
In response to Re: plperl vs LC_COLLATE (was Re: Possible savepoint bug)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers

Tom Lane wrote:

>Andrew Dunstan <andrew@dunslane.net> writes:
>  
>
>>The attached patch against cvs tip does seem to work. Instead of playing 
>>with the environment, we simply allow perl to do its worst and then put 
>>things back the way we wanted them.
>>    
>>
>
>Doesn't that screw up Perl, though?  Its idea of what the locale is
>will be wrong.
>
>Maybe that's the least bad alternative available, but it doesn't seem
>like we're there yet.
>
>(Of course, the *big* problem with this approach is that it's
>Perl-specific, and won't do a thing for any other libraries that
>might try to do setlocale(LC_ALL, "").)
>
>    
>  
>

All true, which is why I tried to avoid this solution.

However, I have not found another one that works. Specifically, 
unsetting LANG and LC_COLLATE did not work as I thought it would.

If anyone can provide a better solution I will be very happy.

cheers

andrew


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: catalog corruption bug
Next
From: Tom Lane
Date:
Subject: Re: stat /etc/localtime 38000 times on startup?