Re: Null handling and plpython - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Null handling and plpython
Date
Msg-id 24518.1249583198@sss.pgh.pa.us
Whole thread Raw
In response to Null handling and plpython  (Peter Eisentraut <peter_e@gmx.net>)
List 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 by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: the case for machine-readable error fields
Next
From: decibel
Date:
Subject: Re: GRANT ON ALL IN schema