Here is a simplificated example:
CREATE OR REPLACE FUNCTION ttt () RETURNS text AS '
return "";
' LANGUAGE 'plperlu';
CREATE OR REPLACE FUNCTION qqq () RETURNS text as '
DECLARE
v_text text;
v_text2 text;
BEGIN
v_text := upper(''ÄÏ''); -- cyrillic chars
v_text2 := ttt();
RETURN v_text || upper(''ÐÏÓÌÅ''); -- cyrillic chars
END;
' LANGUAGE 'plpgsql';
and qqq() returns "äïÐÏÓÌÅ". That is upper() doesn't work correctly
after plperlu function call.
--
Sergey Suleymanov 5 1244
Sergey Suleymanov <so**@eatpbank.ru> writes: ... That is upper() doesn't work correctly after plperlu function call.
It sounds like Perl is taking it on itself to change the process'
LC_CTYPE settings. That's very nasty of it :-(. Can anyone confirm
that libperl does such things, or find a workaround to prevent it?
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings
>>>>> Tom Lane writes: ... That is upper() doesn't work correctly after plperlu function call.
Tom> It sounds like Perl is taking it on itself to change the
Tom> process' LC_CTYPE settings. That's very nasty of it :-(. Can
Tom> anyone confirm that libperl does such things, or find a
Tom> workaround to prevent it?
It seems a startup script issue. When I restarting postmaster
manualy (within root session with LC_CTYPE = ru_RU.KOI8-R)
everything works fine.
Do we need "export LANG=..." before starting postmaster?
--
Sergey Suleymanov
Sergey Suleymanov <so**@eatpbank.ru> writes: Tom Lane writes: ... That is upper() doesn't work correctly after plperlu function call.
Tom> It sounds like Perl is taking it on itself to change the Tom> process' LC_CTYPE settings. That's very nasty of it :-(. Can Tom> anyone confirm that libperl does such things, or find a Tom> workaround to prevent it?
It seems a startup script issue. When I restarting postmaster manualy (within root session with LC_CTYPE = ru_RU.KOI8-R) everything works fine.
Do we need "export LANG=..." before starting postmaster?
Hm. The postmaster extracts the correct setlocale() values from the
pg_control file, but IIRC it doesn't bother to set the environment
variables LC_CTYPE etc. Maybe it should. Peter, I think this is your
turf --- what do you think?
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)
>>>>> Tom Lane writes: ... That is upper() doesn't work correctly after plperlu function call.
Tom> It sounds like Perl is taking it on itself to change the
Tom> process' LC_CTYPE settings. That's very nasty of it :-(. Can
Tom> anyone confirm that libperl does such things, or find a
Tom> workaround to prevent it?
It seems a startup script issue. When I restarting postmaster
manualy (within root session with LC_CTYPE = ru_RU.KOI8-R)
everything works fine.
Do we need "export LANG=..." before starting postmaster?
--
Sergey Suleymanov
Sergey Suleymanov <so**@eatpbank.ru> writes: Tom Lane writes: ... That is upper() doesn't work correctly after plperlu function call.
Tom> It sounds like Perl is taking it on itself to change the Tom> process' LC_CTYPE settings. That's very nasty of it :-(. Can Tom> anyone confirm that libperl does such things, or find a Tom> workaround to prevent it?
It seems a startup script issue. When I restarting postmaster manualy (within root session with LC_CTYPE = ru_RU.KOI8-R) everything works fine.
Do we need "export LANG=..." before starting postmaster?
Hm. The postmaster extracts the correct setlocale() values from the
pg_control file, but IIRC it doesn't bother to set the environment
variables LC_CTYPE etc. Maybe it should. Peter, I think this is your
turf --- what do you think?
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Ksenia Marasanova |
last post by:
Hi,
I have some problems with locale module.
On my workstation, changing locale doesn't have effect:
Python 2.3 (#1, Sep 13 2003, 00:49:11)
on darwin
Type "help", "copyright", "credits" or...
|
by: Jorgen Grahn |
last post by:
I'm sitting here with a Debian Linux 'Woody' system with the default Python
2.2 installation, and I want the re module to understand that
re.compile(r'\W+'. re.LOCALE) doesn't match my national,...
|
by: Cagdas Ozgenc |
last post by:
Greetings.
I am confused about C++ standard library locale stuff. It seems as if the
implementations of locales are not part of the library, but only some
guideline classes are there.
What is...
|
by: |
last post by:
Hi all,
running the following code as an console application:
#include <locale>
#include <iostream>
#include <sstream>
#include <tchar.h>
using namespace std;
|
by: robert |
last post by:
Why can the default locale not be set by its true name? but only by '' ? :
PythonWin 2.5 (r25:51908, Sep 19 2006, 09:52:17) on win32.
(None, None)
Traceback (most recent call last):
File...
|
by: cris |
last post by:
Hi,
I got trouble when I try to change the locale used in a program foo.cc
// ----------------- begin
#include <iostream>
#include <locale>
#include <exception>
using namespace std;
int...
|
by: Daniele C. |
last post by:
I will report a snippet from http://php.net/setlocale
I spent about 2 seconds before thinking: can it really be? I mean, is
there no way to set locale info per thread? And after a brief web...
|
by: Donn Ingle |
last post by:
Hello,
I hope someone can illuminate this situation for me.
Here's the nutshell:
1. On start I call locale.setlocale(locale.LC_ALL,''), the getlocale.
2. If this returns "C" or anything...
|
by: Roman Bertle |
last post by:
Hello,
I try to format monetary values using the locale module, python2.5:
Python 2.5.2a0 (r251:54863, Jan 3 2008, 17:59:56)
on linux2
Type "help", "copyright", "credits" or "license" for...
|
by: Mario Ruggier |
last post by:
Hi,
i had the following problem when installing py3.0rc1 on a Mac OS X
10.5.5. On this system, the default locale values are:
$ locale
LANG=
LC_COLLATE="C"
LC_CTYPE="UTF-8"
LC_MESSAGES="C"
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| |