Search Postgresql Archives

Re: lower function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
      message can get through to the mailing list cleanly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux