Search Postgresql Archives

Re: ISSTRICT behavior

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Don Y <pgsql@xxxxxxxxxxxxx> writes:
> Is there any way of mimicking the IS STRICT behavior
> *without* declaring the function as "STRICT"?

Are you looking for PG_RETURN_NULL()?  If not, this seems a bit
nonsensical.

> 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.)

If a caller fails to check this (directly or indirectly),
it's the caller's bug not the callee's.  To say otherwise
would require introducing ARGISNULL checks into literally
thousands of places.  There are far fewer call sites of
arbitrary functions, so we put the burden on the callers.

			regards, tom lane


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux