Обсуждение: return values from plperl function

Поиск
Список
Период
Сортировка

return values from plperl function

От
Matthias Leopold
Дата:
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