1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-30 21:42:05 +03:00

Enable another five tuple status bits by using the high bits of the

nattr field, and rename the field.

Heikki Linnakangas
This commit is contained in:
Bruce Momjian
2007-01-09 22:01:00 +00:00
parent ca9213e8fa
commit 40f797be03
6 changed files with 44 additions and 34 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/executor/spi.c,v 1.168 2007/01/05 22:19:29 momjian Exp $
* $PostgreSQL: pgsql/src/backend/executor/spi.c,v 1.169 2007/01/09 22:00:59 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -651,7 +651,7 @@ SPI_getvalue(HeapTuple tuple, TupleDesc tupdesc, int fnumber)
SPI_result = 0;
if (fnumber > tuple->t_data->t_natts || fnumber == 0 ||
if (fnumber > HeapTupleHeaderGetNatts(tuple->t_data) || fnumber == 0 ||
fnumber <= FirstLowInvalidHeapAttributeNumber)
{
SPI_result = SPI_ERROR_NOATTRIBUTE;
@ -692,7 +692,7 @@ SPI_getbinval(HeapTuple tuple, TupleDesc tupdesc, int fnumber, bool *isnull)
{
SPI_result = 0;
if (fnumber > tuple->t_data->t_natts || fnumber == 0 ||
if (fnumber > HeapTupleHeaderGetNatts(tuple->t_data) || fnumber == 0 ||
fnumber <= FirstLowInvalidHeapAttributeNumber)
{
SPI_result = SPI_ERROR_NOATTRIBUTE;