Re: lower function - Mailing list pgsql-general

From Mage
Subject Re: lower function
Date
Msg-id 425424D6.8040305@mage.hu
Whole thread Raw
In response to Re: lower function  ("Daniel Verite" <daniel@manitou-mail.org>)
Responses Re: lower function
List pgsql-general
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


pgsql-general by date:

Previous
From: "Daniel Verite"
Date:
Subject: Re: lower function
Next
From: "Daniel Verite"
Date:
Subject: Re: lower function