Salı, Aralık 08, 2009

postgres plperl destegi

Ubuntuda postgresql-plperl-8.4 paketini yukle.

createlang plperl -U kullanici -d veritabani -W

shell komutuyle dili veritabanina yukle.


create function caps(text) returns text as $$
my $x=$_[0];
$x =~ tr/[a-z]/[A-Z/;
return $x;
$$ LANGUAGE plperl;

select caps('der der');
caps
----------
DER DERE
(1 row)