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);
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
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
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
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:
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
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)
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
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,
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.
10 matches
Mail list logo