From: Vadim B. Mikheev Date: Wed, 7 Feb 2001 23:34:18 +0000 (+0000) Subject: Macro for btree runtime fix. X-Git-Tag: REL7_1~543 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=66decbfb08018605b7e0abcba39e2ca1b9093350;p=postgresql Macro for btree runtime fix. --- diff --git a/src/include/access/nbtree.h b/src/include/access/nbtree.h index ed35f7b1f0..e8d0950ecc 100644 --- a/src/include/access/nbtree.h +++ b/src/include/access/nbtree.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: nbtree.h,v 1.50 2001/01/24 19:43:19 momjian Exp $ + * $Id: nbtree.h,v 1.51 2001/02/07 23:34:18 vadim Exp $ * *------------------------------------------------------------------------- */ @@ -50,6 +50,10 @@ typedef BTPageOpaqueData *BTPageOpaque; #define BTREE_METAPAGE 0 /* first page is meta */ #define BTREE_MAGIC 0x053162 +#define BTreeInvalidParent(opaque) \ + (opaque->btpo_parent == InvalidBlockNumber || \ + opaque->btpo_parent == BTREE_METAPAGE) + #define BTREE_VERSION 1 typedef struct BTMetaPageData