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/include/access/htup.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/include/access/htup.h') diff --git a/src/include/access/htup.h b/src/include/access/htup.h index f64925ea98..a47e668f9b 100644 --- a/src/include/access/htup.h +++ b/src/include/access/htup.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/access/htup.h,v 1.63 2003/11/29 22:40:55 pgsql Exp $ + * $PostgreSQL: pgsql/src/include/access/htup.h,v 1.64 2004/01/16 20:51:30 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -436,9 +436,15 @@ typedef HeapTupleData *HeapTuple; */ #define HeapTupleIsValid(tuple) PointerIsValid(tuple) +#define HeapTupleHasNulls(tuple) \ + (((tuple)->t_data->t_infomask & HEAP_HASNULL) != 0) + #define HeapTupleNoNulls(tuple) \ (!((tuple)->t_data->t_infomask & HEAP_HASNULL)) +#define HeapTupleHasVarWidth(tuple) \ + (((tuple)->t_data->t_infomask & HEAP_HASVARWIDTH) != 0) + #define HeapTupleAllFixed(tuple) \ (!((tuple)->t_data->t_infomask & HEAP_HASVARWIDTH)) -- cgit v1.2.1