diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2004-01-16 20:51:30 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2004-01-16 20:51:30 +0000 |
commit | 0966516b75f792cfa9fd6a53fc370e06cfca6bee (patch) | |
tree | bcb40a4b0c6752450c198c339abc79cca7b0c93b /src/include | |
parent | b89744198e4c4a49a09f856332d8bbe90e320720 (diff) | |
download | postgresql-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/include')
-rw-r--r-- | src/include/access/htup.h | 8 | ||||
-rw-r--r-- | src/include/postgres.h | 4 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/include/access/htup.h b/src/include/access/htup.h index f64925ea982..a47e668f9b2 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)) diff --git a/src/include/postgres.h b/src/include/postgres.h index f3ce6e71d0e..8fa6d08590d 100644 --- a/src/include/postgres.h +++ b/src/include/postgres.h @@ -10,7 +10,7 @@ * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * Portions Copyright (c) 1995, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/postgres.h,v 1.67 2004/01/04 05:57:21 tgl Exp $ + * $PostgreSQL: pgsql/src/include/postgres.h,v 1.68 2004/01/16 20:51:30 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -59,8 +59,6 @@ * TOASTed. * ---------------- */ -#define TUPLE_TOASTER_ACTIVE - typedef struct varattrib { int32 va_header; /* External/compressed storage */ |