return values from plperl function - Mailing list pgsql-novice

From Matthias Leopold
Subject return values from plperl function
Date
Msg-id 4F43C9E1.80505@aic.at
Whole thread Raw
List pgsql-novice
hi,

i wrote a function in plperl which i want to use with postfix. the
function should only return a value in certain cases, otherwise it
should return "nothing", not the empty string. i don't know how to do that.

presently i begin with

"CREATE FUNCTION foo (text, text) RETURNS character varying (255)"

and end with

"if ($ary[0][1] eq $bar) { return $val; }"

this ALWAYS returns a "row", which is not what i want

thx for advice
matthias




pgsql-novice by date:

Previous
From: Michael Wood
Date:
Subject: Re: How to count ones in a bit string?
Next
From: Bartosz Dmytrak
Date:
Subject: Re: Foreign Key to an (abstract?) Parent Table