head 1.12; access; symbols Version_2_1:1.9 Version_2:1.6 C_Demo_1:1.4; locks; strict; comment @ * @; 1.12 date 92.03.04.22.13.52; author mer; state Exp; branches; next 1.11; 1.11 date 91.08.09.02.48.52; author glass; state Exp; branches; next 1.10; 1.10 date 91.04.28.09.15.52; author cimarron; state Exp; branches; next 1.9; 1.9 date 91.02.19.13.59.01; author mao; state Exp; branches; next 1.8; 1.8 date 90.08.18.00.39.56; author cimarron; state Exp; branches; next 1.7; 1.7 date 90.08.17.08.50.56; author cimarron; state Exp; branches; next 1.6; 1.6 date 89.09.25.11.25.54; author cimarron; state Version_2; branches; next 1.5; 1.5 date 89.09.21.19.12.37; author hirohama; state Exp; branches; next 1.4; 1.4 date 89.09.05.17.07.09; author mao; state C_Demo_1; branches; next 1.3; 1.3 date 89.04.12.19.54.35; author dillon; state Exp; branches; next 1.2; 1.2 date 89.03.22.17.33.17; author muir; state Stab; branches; next 1.1; 1.1 date 89.01.17.05.54.15; author cimarron; state Exp; branches; next ; desc @@ 1.12 log @pass number of attributes as an arg to IndexSupportInitialize @ text @/* * istrat.h -- * POSTGRES index strategy definitions. */ #ifndef IStratIncluded /* Include this file only once */ #define IStratIncluded 1 /* * Identification: */ #define ISTRAT_H "$Header: /u/mer/pg_opt.new/src/lib/H/access/RCS/istrat.h,v 1.11 1991/08/09 02:48:52 glass Exp mer $" #include "tmp/postgres.h" #include "access/attnum.h" #include "access/skey.h" typedef uint16 StrategyNumber; #define InvalidStrategy 0 #ifndef CorrectStrategies /* XXX this should be removable */ #define AMStrategies(foo) 12 #else /* !defined(CorrectStrategies) */ #define AMStrategies(foo) (foo) #endif /* !defined(CorrectStrategies) */ typedef struct StrategyMapData { ScanKeyEntryData entry[1]; /* VARIABLE LENGTH ARRAY */ } StrategyMapData; /* VARIABLE LENGTH STRUCTURE */ typedef StrategyMapData *StrategyMap; typedef struct IndexStrategyData { StrategyMapData strategyMapData[1]; /* VARIABLE LENGTH ARRAY */ } IndexStrategyData; /* VARIABLE LENGTH STRUCTURE */ typedef IndexStrategyData *IndexStrategy; /* * StrategyNumberIsValid -- * True iff the strategy number is valid. */ #define StrategyNumberIsValid(strategyNumber) \ ((bool) ((strategyNumber) != InvalidStrategy)) /* * StrategyNumberIsInBounds -- * True iff strategy number is within given bounds. * * Note: * Assumes StrategyNumber is an unsigned type. * Assumes the bounded interval to be (0,max]. */ #define StrategyNumberIsInBounds(strategyNumber, maxStrategyNumber) \ ((bool)(InvalidStrategy < (strategyNumber) && \ (strategyNumber) <= (maxStrategyNumber))) /* * StrategyMapIsValid -- * True iff the index strategy mapping is valid. */ #define StrategyMapIsValid(map) PointerIsValid(map) /* * IndexStrategyIsValid -- * True iff the index strategy is valid. */ #define IndexStrategyIsValid(s) PointerIsValid(s) /* * StrategyMapGetScanKeyEntry -- * Returns a scan key entry of a index strategy mapping member. * * Note: * Assumes that the index strategy mapping is valid. * Assumes that the index strategy number is valid. * Bounds checking should be done outside this routine. */ extern ScanKeyEntry StrategyMapGetScanKeyEntry ARGS(( StrategyMap map, StrategyNumber strategyNumber )); /* * IndexStrategyGetStrategyMap -- * Returns an index strategy mapping of an index strategy. * * Note: * Assumes that the index strategy is valid. * Assumes that the number of index strategies is valid. * Bounds checking should be done outside this routine. */ extern StrategyMap IndexStrategyGetStrategyMap ARGS(( IndexStrategy indexStrategy, StrategyNumber maxStrategyNumber, AttributeNumber attributeNumber )); /* * AttributeNumberGetIndexStrategySize -- * Computes the size of an index strategy. */ extern Size AttributeNumberGetIndexStrategySize ARGS(( AttributeNumber maxAttributeNumber, StrategyNumber maxStrategyNumber )); /* * IndexSupportInitialize -- * Initializes an index strategy and associated support procedures. */ extern void IndexSupportInitialize ARGS(( IndexStrategy indexStrategy, RegProcedure *indexSupport, ObjectId indexObjectId, ObjectId accessMethodObjectId, StrategyNumber maxStrategyNumber, StrategyNumber maxSupportNumber, AttributeNumber maxAttributeNumber )); #endif /* !defined(IStratIncluded) */ @ 1.11 log @bad prototype fixed @ text @d12 1 a12 1 #define ISTRAT_H "$Header: /n/erewhon/usr/users/glass/postgres1/src/lib/H/access/RCS/istrat.h,v 1.10 91/04/28 09:15:52 cimarron Exp Locker: glass $" d127 2 a128 1 StrategyNumber maxSupportNumber @ 1.10 log @Converted IsValid code into macros and added an improved NodeIsType scheme @ text @d12 1 a12 1 #define ISTRAT_H "$Header: RCS/istrat.h,v 1.9 91/02/19 13:59:01 mao Exp Locker: cimarron $" d126 1 a126 1 StrategyNumber maxStrategyNumber @ 1.9 log @new rtree code installed @ text @d12 1 a12 1 #define ISTRAT_H "$Header: RCS/istrat.h,v 1.8 90/08/18 00:39:56 cimarron Exp Locker: mao $" d44 2 a45 5 extern bool StrategyNumberIsValid ARGS(( StrategyNumber strategyNumber )); d55 3 a57 6 extern bool StrategyNumberIsInBounds ARGS(( StrategyNumber strategyNumber, StrategyNumber maxStrategyNumber )); d63 1 a63 5 extern bool StrategyMapIsValid ARGS(( StrategyMap map )); d69 1 a69 5 extern bool IndexStrategyIsValid ARGS(( IndexStrategy indexStrategy )); @ 1.8 log @eliminated less significant .h files @ text @d12 1 a12 1 #define ISTRAT_H "$Header: RCS/istrat.h,v 1.7 90/08/17 08:50:56 cimarron Exp Locker: cimarron $" d130 2 a131 2 * IndexStrategyInitialize -- * Initializes an index strategy. d135 1 a135 1 IndexStrategyInitialize ARGS(( d137 1 d141 1 @ 1.7 log @added pathnames to #include statements @ text @d12 1 a12 1 #define ISTRAT_H "$Header: RCS/istrat.h,v 1.6 89/09/25 11:25:54 cimarron Version_2 Locker: cimarron $" d14 1 a14 1 #include "tmp/c.h" a16 1 #include "tmp/oid.h" @ 1.6 log @moved dynamic symbol stuff to syms.h @ text @d12 1 a12 1 #define ISTRAT_H "$Header: RCS/istrat.h,v 1.5 89/09/21 19:12:37 hirohama Exp $" d14 4 a17 13 #ifndef C_H #include "c.h" #endif #ifndef ATTNUM_H # include "attnum.h" #endif #ifndef SKEY_H # include "skey.h" #endif #ifndef OID_H # include "oid.h" #endif @ 1.5 log @added ...SYMBOLS declarations miscellaneous cleanup @ text @d12 1 a12 1 #define ISTRAT_H "$Header: RCS/istrat.h,v 1.4 89/09/05 17:07:09 mao C_Demo_1 Locker: hirohama $" a150 15 #define ISTRAT_SYMBOLS \ SymbolDecl(StrategyNumberIsValid, "_StrategyNumberIsValid"), \ SymbolDecl(IndexStrategyIsValid, "_IndexStrategyIsValid") /* * Protected symbols: * * StrategyNumberIsInBounds * AttributeNumberGetIndexStrategySize * StrategyMapIsValid * StrategyMapGetScanKeyEntry * IndexStrategyGetStrategyMap * AttributeNumberGetIndexStrategySize * IndexStrategyInintialize */ @ 1.4 log @Working version of C-only demo @ text @a3 3 * * Identification: * $Header: /usr6/postgres/mao/postgres/src/lib/H/RCS/istrat.h,v 1.3 89/04/12 19:54:35 dillon Exp $ d6 1 a6 1 #ifndef IStratIncluded /* Include this file only once. */ d9 5 d18 9 a26 3 #include "attnum.h" #include "skey.h" #include "oid.h" d151 15 @ 1.3 log @c.h @ text @d6 1 a6 1 * $Header: /usr6/postgres/dillon/ptree/src/lib/H/RCS/istrat.h,v 1.2 89/03/22 17:33:17 muir Stab $ @ 1.2 log @copyright removal @ text @d6 1 a6 1 * $Header: /usr6/postgres/muir/postgres/src/lib/H/RCS/istrat.h,v 1.1 89/01/17 05:54:15 cimarron Exp $ d12 1 d14 1 @ 1.1 log @Initial revision @ text @a0 27 ; /* ; * ; * POSTGRES Data Base Management System ; * ; * Copyright (c) 1988 Regents of the University of California ; * ; * Permission to use, copy, modify, and distribute this software and its ; * documentation for educational, research, and non-profit purposes and ; * without fee is hereby granted, provided that the above copyright ; * notice appear in all copies and that both that copyright notice and ; * this permission notice appear in supporting documentation, and that ; * the name of the University of California not be used in advertising ; * or publicity pertaining to distribution of the software without ; * specific, written prior permission. Permission to incorporate this ; * software into commercial products can be obtained from the Campus ; * Software Office, 295 Evans Hall, University of California, Berkeley, ; * Ca., 94720 provided only that the the requestor give the University ; * of California a free licence to any derived software for educational ; * and research purposes. The University of California makes no ; * representations about the suitability of this software for any ; * purpose. It is provided "as is" without express or implied warranty. ; * ; */ d6 1 a6 1 * $Header: istrat.h,v 1.1 88/11/11 16:37:09 postgres Exp $ @