Re: lower function

From: Mage <mage(at)mage(dot)hu>
To: Daniel Verite <daniel(at)manitou-mail(dot)org>, pgsql-general(at)postgresql(dot)org
Subject: Re: lower function
Date: 2005-04-06 18:05:10
Message-ID: 425424D6.8040305@mage.hu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Daniel Verite 2005-04-06 18:25:45 Re: lower function
Previous Message Daniel Verite 2005-04-06 17:49:46 Re: lower function