Hi all
I'm trying to find documentation for postgres/plperl.
the online postgres documentation has only two examples in it and i am
struggling to find any more that i can make sense of. also most of the
documents i find are about installing pl/perl. this i have done and tested
with the examples found in the online documentation.
i am a complete newbie to both perl and postgres functions, so the
documentation will almost have to have to draw pictures.
i am trying to build a function that strips whitespace.
with the following
CREATE or REPLACE FUNCTION remspace(TEXT) RETURN TEXT
AS '
@_ =~ s/\s*//;
return @_'
LANGUAGE 'plperl';
i keep getting:
parser: parse error at or near "return"
no matter what i do. i have a feeling this means that i have a syntax error
some where in the function, but can't figger out where. is there any way of
getting a more detailed error description?
duncan