return values from plperl function

From: Matthias Leopold <matthias(at)aic(dot)at>
To: pgsql-novice(at)postgresql(dot)org
Subject: return values from plperl function
Date: 2012-02-21 16:44:17
Message-ID: 4F43C9E1.80505@aic.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-novice by date

  From Date Subject
Next Message Bartosz Dmytrak 2012-02-21 21:13:21 Re: Foreign Key to an (abstract?) Parent Table
Previous Message Michael Wood 2012-02-21 15:52:12 Re: How to count ones in a bit string?