From 0966516b75f792cfa9fd6a53fc370e06cfca6bee Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 16 Jan 2004 20:51:30 +0000 Subject: 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. --- src/backend/access/common/heaptuple.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src/backend/access/common/heaptuple.c') diff --git a/src/backend/access/common/heaptuple.c b/src/backend/access/common/heaptuple.c index 8bb4b7149f2..f1b20ff2732 100644 --- a/src/backend/access/common/heaptuple.c +++ b/src/backend/access/common/heaptuple.c @@ -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 */ -- cgit v1.2.3