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

Tighten short-circuit tests for deciding whether we need to invoke

tuptoaster.c --- fields that are compressed in-line are not a reason
to invoke the toaster.  Along the way, add a couple more htup.h macros
to eliminate confusing negated tests, and get rid of the already
vestigial TUPLE_TOASTER_ACTIVE symbol.
This commit is contained in:
Tom Lane
2004-01-16 20:51:30 +00:00
parent b89744198e
commit 0966516b75
4 changed files with 26 additions and 31 deletions

View File

@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/access/common/heaptuple.c,v 1.88 2003/11/29 19:51:39 pgsql Exp $
* $PostgreSQL: pgsql/src/backend/access/common/heaptuple.c,v 1.89 2004/01/16 20:51:30 tgl Exp $
*
* NOTES
* The old interface functions have been converted to macros
@ -303,7 +303,7 @@ nocachegetattr(HeapTuple tuple,
return fetchatt(att[attnum],
tp + att[attnum]->attcacheoff);
}
else if (!HeapTupleAllFixed(tuple))
else if (HeapTupleHasVarWidth(tuple))
{
int j;
@ -378,13 +378,10 @@ nocachegetattr(HeapTuple tuple,
for (i = 0; i < attnum; i++)
{
if (!HeapTupleNoNulls(tuple))
if (HeapTupleHasNulls(tuple) && att_isnull(i, bp))
{
if (att_isnull(i, bp))
{
usecache = false;
continue;
}
usecache = false;
continue;
}
/* If we know the next offset, we can skip the rest */