1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-05 02:22:28 +03:00

Inline fastgetattr and others so data access does not use function

calls.
This commit is contained in:
Bruce Momjian
1998-01-31 04:39:26 +00:00
parent 2df6bba3ca
commit 726c3854cb
35 changed files with 350 additions and 215 deletions

View File

@@ -341,7 +341,7 @@ SPI_modifytuple(Relation rel, HeapTuple tuple, int natts, int *attnum,
/* fetch old values and nulls */
for (i = 0; i < numberOfAttributes; i++)
{
v[i] = heap_getattr(tuple, InvalidBuffer, i + 1, rel->rd_att, &isnull);
v[i] = heap_getattr(tuple, i + 1, rel->rd_att, &isnull);
n[i] = (isnull) ? 'n' : ' ';
}
@@ -420,7 +420,7 @@ SPI_getvalue(HeapTuple tuple, TupleDesc tupdesc, int fnumber)
return (NULL);
}
val = heap_getattr(tuple, InvalidBuffer, fnumber, tupdesc, &isnull);
val = heap_getattr(tuple, fnumber, tupdesc, &isnull);
if (isnull)
return (NULL);
foutoid = typtoout((Oid) tupdesc->attrs[fnumber - 1]->atttypid);
@@ -446,7 +446,7 @@ SPI_getbinval(HeapTuple tuple, TupleDesc tupdesc, int fnumber, bool * isnull)
return ((Datum) NULL);
}
val = heap_getattr(tuple, InvalidBuffer, fnumber, tupdesc, isnull);
val = heap_getattr(tuple, fnumber, tupdesc, isnull);
return (val);
}