Re: ISSTRICT behavior

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: ISSTRICT behavior
Дата
Msg-id 20060504073643.GE4752@svana.org
обсуждение исходный текст
Ответ на Re: ISSTRICT behavior  (Don Y <pgsql@DakotaCom.Net>)
Ответы Re: ISSTRICT behavior  (Don Y <pgsql@DakotaCom.Net>)
Список pgsql-general
On Thu, May 04, 2006 at 12:29:30AM -0700, Don Y wrote:
> OTOH, if the function could *abort* it's invocation, then
> I don't have to worry about return values.  It is a closer
> model to the STRICT behavior -- instead of aborting the
> function invocation BEFORE (which STRICT essentially does),
> I could abort it AFTER invocation (once I had detected
> the NULL argument)

Are you sure you understand what STRICT does? STRICT doesn't abort
anything. STRICT means "if this function gets called with any NULL
arguments, the result is NULL". Since this is correct behaviour for the
vast majority of functions, it's implemented as a flag rather than
requiring each and every function to check.

Also, anything that calls a function must be prepared to handle a NULL
return value. Any function can return NULL, even if only because it is
declared strict and you passed a null argument...

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Вложения

В списке pgsql-general по дате отправления:

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: ISSTRICT behavior
Следующее
От: Don Y
Дата:
Сообщение: Re: ISSTRICT behavior