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 failed: 'require' trapped by operation
mask at (eval 6) line 2.
Another problem:
create or replace function keywords_split(text) returns text as $$
my $res = spi_exec_query("select lower('" . $_[0] . "')");
my $text = 'test' . $res->{rows}[0]->{lower};
return $text;
$$
language plperl;
# select keywords_split('AúéöÖÉÁ');
keywords_split
----------------
testaúéöÖÉÁ
(1 row)
The spi_exec_query with lower also don't work.
I have found another bug in a plperl trigger which I can't reproduce. I
find plperl a bit buggy.
Mage