aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/common/heaptuple.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2004-01-16 20:51:30 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2004-01-16 20:51:30 +0000
commit0966516b75f792cfa9fd6a53fc370e06cfca6bee (patch)
treebcb40a4b0c6752450c198c339abc79cca7b0c93b /src/backend/access/common/heaptuple.c
parentb89744198e4c4a49a09f856332d8bbe90e320720 (diff)
downloadpostgresql-0966516b75f792cfa9fd6a53fc370e06cfca6bee.tar.gz
postgresql-0966516b75f792cfa9fd6a53fc370e06cfca6bee.zip
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.
Diffstat (limited to 'src/backend/access/common/heaptuple.c')
-rw-r--r--src/backend/access/common/heaptuple.c13
1 files changed, 5 insertions, 8 deletions
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 */