On Tue, Jun 18, 2013 at 11:04:25AM -0700, Kevin Grittner wrote:
> D'Arcy J.M. Cain <[email protected]>
>
> > Although, the more I think about it, the more I think that the comment
> > is both confusing and superfluous. The code itself is much clearer.
>
> Seriously, if there is any comment there at all, it should be a
> succinct explanation for why we didn't do this (which passes `make
> check-world`):
Is everyone OK with me applying this patch from Kevin, attached?
--
Bruce Momjian <[email protected]> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ Everyone has their own god. +
diff --git a/src/backend/access/common/heaptuple.c b/src/backend/access/common/heaptuple.c
new file mode 100644
index aea9d40..7616cfc
*** a/src/backend/access/common/heaptuple.c
--- b/src/backend/access/common/heaptuple.c
*************** bool
*** 1321,1327 ****
slot_attisnull(TupleTableSlot *slot, int attnum)
{
HeapTuple tuple = slot->tts_tuple;
! TupleDesc tupleDesc = slot->tts_tupleDescriptor;
/*
* system attributes are handled by heap_attisnull
--- 1321,1328 ----
slot_attisnull(TupleTableSlot *slot, int attnum)
{
HeapTuple tuple = slot->tts_tuple;
!
! Assert(attnum <= slot->tts_tupleDescriptor->natts);
/*
* system attributes are handled by heap_attisnull
*************** slot_attisnull(TupleTableSlot *slot, int
*** 1342,1353 ****
return slot->tts_isnull[attnum - 1];
/*
- * return NULL if attnum is out of range according to the tupdesc
- */
- if (attnum > tupleDesc->natts)
- return true;
-
- /*
* otherwise we had better have a physical tuple (tts_nvalid should equal
* natts in all virtual-tuple cases)
*/
--- 1343,1348 ----
--
Sent via pgsql-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers