Re: [GENERAL] lower function

2005-04-07 Thread Mage
Scott Marlowe wrote: You're far more likely to learn tcl or python or php in an afternoon than to get a patched perl executable in that time. But I'd still report the bug to them. create or replace function keywords_split(text) returns text as $$ use locale; use POSIX qw(locale_h);

[GENERAL] lower function

2005-04-06 Thread Mage
Hello, I have a database with encoding latin2, ctype hu_HU, posgresql 8.0.1. Keyword split is a plperl function: create or replace function keywords_split(text) returns text as $$ my $text = lc $_[0]; return $text; $$ language plperl; My problem is: $ psql teszt; Welcome to psql

Re: [GENERAL] lower function

2005-04-06 Thread Daniel Verite
Mage wrote: teszt=# select keywords_split('AúéöÖÉÁ'); keywords_split aúéöÖÉÁ (1 row) What happens if you add use locale; in your perl function before calling lc ? -- Daniel PostgreSQL-powered mail user agent and storage: http://www.manitou-mail.org

Re: [GENERAL] lower function

2005-04-06 Thread Mage
Daniel Verite wrote: Mage wrote: teszt=# select keywords_split('A'); keywords_split a (1 row) What happens if you add use locale; in your perl function before calling lc ? with use locale;: select keywords_split('A'); ERROR: creation of Perl function

Re: [GENERAL] lower function

2005-04-06 Thread Daniel Verite
Mage wrote: with use locale;: select keywords_split('AúéöÖÉÁ'); ERROR: creation of Perl function failed: 'require' trapped by operation mask at (eval 6) line 2. Ah. So maybe it would work with plperlu instead of plperl. -- Daniel PostgreSQL-powered mail user agent and storage:

Re: [GENERAL] lower function

2005-04-06 Thread Mage
Daniel Verite wrote: Mage wrote: with use locale;: select keywords_split('A'); ERROR: creation of Perl function failed: 'require' trapped by operation mask at (eval 6) line 2. Ah. So maybe it would work with plperlu instead of plperl. I did, and it didn't help. Mage

Re: [GENERAL] lower function

2005-04-06 Thread Mage
It's serious. teszt=# select lower('A'); lower - a (1 row) teszt=# create or replace function keywords_split(text) returns text as $$ teszt$# return ''; teszt$# $$ teszt-# language plperlu; CREATE FUNCTION teszt=# select keywords_split(''); keywords_split (1 row)

Re: [GENERAL] lower function

2005-04-06 Thread Tom Lane
Mage [EMAIL PROTECTED] writes: It's serious. That's a Perl bug not a Postgres bug: libperl should not change the process's locale settings, or at least if it does it should restore the prior settings before returning. It doesn't. regards, tom lane

Re: [GENERAL] lower function

2005-04-06 Thread Mage
Tom Lane wrote: Mage [EMAIL PROTECTED] writes: It's serious. That's a Perl bug not a Postgres bug: libperl should not change the process's locale settings, or at least if it does it should restore the prior settings before returning. It doesn't. I checked with show all,

Re: [GENERAL] lower function

2005-04-06 Thread Scott Marlowe
On Wed, 2005-04-06 at 17:26, Mage wrote: Tom Lane wrote: Mage [EMAIL PROTECTED] writes: It's serious. That's a Perl bug not a Postgres bug: libperl should not change the process's locale settings, or at least if it does it should restore the prior settings before returning.