Excluding null return values from functions

From: Jason Armstrong <ja(at)riverdrums(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Excluding null return values from functions
Date: 2009-11-25 11:59:19
Message-ID: f51cd3b20911250359r6365e12kbeaf90dca115c957@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

How do I give a condition on the return value of a function (for
example plperl)?

I have a perl search function that returns either a bigint, or undef
if nothing is found. I want to exclude the undef/null return values
from my select statement, something like:

sql> select search(data, 'field', 'value') as result from mydata where
result is not null;

--
Jason Armstrong

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Pavel Stehule 2009-11-25 12:03:56 Re: Excluding null return values from functions
Previous Message Matthew Wakeling 2009-11-25 11:07:36 Re: [PERFORM] Strange performance degradation