From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: [HACKERS] NULL as an argument in plpgsql functions |
Date: | 1999-10-03 16:41:49 |
Message-ID: | 20815.938968909@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
"D'Arcy" "J.M." Cain <darcy(at)druid(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 1999-10-03 16:53:18 | Re: [HACKERS] Tricky query, tricky response |
Previous Message | Tom Lane | 1999-10-03 16:32:46 | Re: [HACKERS] NULL as an argument in plpgsql functions |