Re: Bogus attribute-number range checks in spi.c - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Bogus attribute-number range checks in spi.c
Date
Msg-id 19627.1224083604@sss.pgh.pa.us
Whole thread Raw
In response to Re: Bogus attribute-number range checks in spi.c  (Gregory Stark <stark@enterprisedb.com>)
List pgsql-hackers
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


pgsql-hackers by date:

Previous
From: Decibel!
Date:
Subject: Re: Column level triggers
Next
From: Tom Lane
Date:
Subject: Re: Is autovacuum too noisy about orphan temp tables?