Re: Null handling and plpython

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Null handling and plpython
Date: 2009-08-06 18:26:38
Message-ID: 24518.1249583198@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter_e(at)gmx(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message decibel 2009-08-06 18:34:03 Re: GRANT ON ALL IN schema
Previous Message Kevin Grittner 2009-08-06 18:23:20 Re: the case for machine-readable error fields