ISSTRICT behavior

Поиск
Список
Период
Сортировка
От Don Y
Тема ISSTRICT behavior
Дата
Msg-id 445998F2.7090304@DakotaCom.Net
обсуждение исходный текст
Ответы Re: ISSTRICT behavior  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: ISSTRICT behavior  (Martijn van Oosterhout <kleptog@svana.org>)
Список 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 по дате отправления:

Предыдущее
От: Joe Healy
Дата:
Сообщение: Re: psql is slow and it does not take much resources
Следующее
От: Tom Lane
Дата:
Сообщение: Re: ISSTRICT behavior