Can a pl/perl function return NULL?

Started by Jeff Eckermannover 24 years ago2 messagesgeneral
Jump to latest
#1Jeff Eckermann
jeckermann@verio.net

I sure hope so, because I want to index the results of the function, and I
don't want the "nothing" results to be counted in query plans.
I thought "return undef" might do it, but that wasn't recognized as a NULL
in my test.
I can write a pl/pgsql function, but that will take at least five times as
long in this case :-)

#2Alex Pilosov
alex@pilosoft.com
In reply to: Jeff Eckermann (#1)
Re: Can a pl/perl function return NULL?

According to plperl source code in CVS, it _should_ work (tm). According
to a quick test, it doesn't. I'll do further checking later tonight.

-alex

On Thu, 6 Sep 2001, Jeff Eckermann wrote:

Show quoted text

I sure hope so, because I want to index the results of the function, and I
don't want the "nothing" results to be counted in query plans.
I thought "return undef" might do it, but that wasn't recognized as a NULL
in my test.
I can write a pl/pgsql function, but that will take at least five times as
long in this case :-)

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)