Re: [HACKERS] NULL as an argument in plpgsql functions

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] NULL as an argument in plpgsql functions
Дата
Msg-id 20815.938968909@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] NULL as an argument in plpgsql functions  ("D'Arcy" "J.M." Cain <darcy@druid.net>)
Список pgsql-hackers
"D'Arcy" "J.M." Cain <darcy@druid.net> writes:
> There was a discussion at the time about fixing this so that the function
> never got called as investigation showed that there were existing ones
> that would also crash if given null inputs.  Did this ever happen?

Nothing's changed yet, but you are right that one of the many problems
with the existing fmgr interface is that checking for null inputs is
both necessary and tedious (= frequently omitted).

I have a rough proposal on the table for cleaning this up so that null
handling is done properly, ie, a function can see *which* of its inputs
are null and can choose whether to return null or not.  The most common
case of a "strict" function (any null input -> null result) would be
painless, but we wouldn't force all functions into that straitjacket.
See my pghackers message of 14 Jun 99.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] NULL as an argument in plpgsql functions
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Tricky query, tricky response