Gregory Stark <stark@enterprisedb.com> writes:
> Tom Lane <tgl@sss.pgh.pa.us> writes:
>> [ pokes around ... ] The difference between correct and incorrect
>> behavior here is that it is correct for SPI_getvalue and SPI_getbinval
>> to return NULL for added columns, but they are incorrect to also set
>> SPI_result to SPI_ERROR_NOATTRIBUTE. However, so far as I can see
>> none of the callers in our CVS bother to check SPI_result :-(.
> I do see several checks against SPI_ERROR_NOATTRIBUTE. I'm not sure what
> context they're in though. pl_exec.c:3606 and pl_exec.c:3940
Those all seem to be checking SPI_fnumber calls. The calls of
SPI_getvalue and SPI_getbinval just assume they cannot get a failure...
regards, tom lane