ISSTRICT behavior - Mailing list pgsql-general

From Don Y
Subject ISSTRICT behavior
Date
Msg-id 445998F2.7090304@DakotaCom.Net
Whole thread Raw
Responses Re: ISSTRICT behavior  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: ISSTRICT behavior  (Martijn van Oosterhout <kleptog@svana.org>)
List pgsql-general
Hi,

Is there any way of mimicking the IS STRICT behavior
*without* declaring the function as "STRICT"?

E.g., I could use PG_ARGISNULL() to check for invocation
with a NULL argument.  But, the function has already been
invoked at that point.  I.e. I still have to *return*
something -- which might be used as an argument to some
other function, etc.

Or, is there some other way of aborting the function
invocation (e.g., signal an ERROR, etc.)?

Lastly, am I correct in assuming that the STRICT
modifier only protect a function from being invoked
with a NULL _from_the_SQL_interface?  I.e. does it
also protect the function from being invoked from
PL/pgsql?  (I'm sure it does NOT protect from a
deliberate invocation from a C language function, etc.)

(sigh)  Sorry to be picking nits.  I'm just trying to
sort out how to protect against folks making careless
mistakes in the future (e.g., forgetting STRICT in
the function declarations when adding a function to
a database, etc)

Thanks!
--don

pgsql-general by date:

Previous
From: Joe Healy
Date:
Subject: Re: psql is slow and it does not take much resources
Next
From: Tom Lane
Date:
Subject: Re: ISSTRICT behavior