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

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to