Re: Null handling and plpython

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Null handling and plpython
Дата
Msg-id 24518.1249583198@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Null handling and plpython  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> And then, what is the supposed semantics of calling a nonstrict input
> function with NULL as the cstring value?  InputFunctionCall() requires
> that the return value is null if and only if the input cstring was
> NULL, "but we'll call the input function anyway".  Couldn't the call
> to InputFunctionCall() be scrapped altogether in the above case?

No.  The point of this is to allow domain_in() to apply domain
constraint checks that might or might not throw error on null values.
I'm not sure whether the code you quote is getting this right in
all the branches, but the last case isn't useless.
        regards, tom lane


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

Предыдущее
От: "Kevin Grittner"
Дата:
Сообщение: Re: the case for machine-readable error fields
Следующее
От: decibel
Дата:
Сообщение: Re: GRANT ON ALL IN schema