head	1.9;
access;
symbols
	Version_2_1:1.5
	Version_2:1.1;
locks; strict;
comment	@ * @;


1.9
date	92.07.28.22.56.31;	author mao;	state Exp;
branches;
next	1.8;

1.8
date	91.06.26.22.32.04;	author mao;	state Exp;
branches;
next	1.7;

1.7
date	91.06.26.19.15.38;	author mao;	state Exp;
branches;
next	1.6;

1.6
date	91.04.24.19.04.05;	author mao;	state Exp;
branches;
next	1.5;

1.5
date	91.02.24.09.06.00;	author mao;	state Exp;
branches;
next	1.4;

1.4
date	91.02.19.13.59.18;	author mao;	state Exp;
branches;
next	1.3;

1.3
date	90.08.17.08.51.36;	author cimarron;	state Exp;
branches;
next	1.2;

1.2
date	90.08.08.08.19.40;	author cimarron;	state Exp;
branches;
next	1.1;

1.1
date	90.06.18.16.16.06;	author cimarron;	state Version_2;
branches;
next	;


desc
@@


1.9
log
@rtrees have eight strategies, not five.
@
text
@/* ----------------------------------------------------------------
 *   FILE
 *	pg_am.h
 *
 *   DESCRIPTION
 *	definition of the system "am" relation (pg_am)
 *	along with the relation's initial contents.
 *
 *   NOTES
 *	the genbki.sh script reads this file and generates .bki
 *	information from the DATA() statements.
 *
 *   IDENTIFICATION
 *	$Header: /private/mao/postgres/src/lib/H/catalog/RCS/pg_am.h,v 1.8 1991/06/26 22:32:04 mao Exp mao $
 * ----------------------------------------------------------------
 */
#ifndef PgAmIncluded
#define PgAmIncluded 1	/* include this only once */

/* ----------------
 *	postgres.h contains the system type definintions and the
 *	CATALOG(), BOOTSTRAP and DATA() sugar words so this file
 *	can be read by both genbki.sh and the C compiler.
 * ----------------
 */
#include "tmp/postgres.h"

/* ----------------
 *	pg_am definition.  cpp turns this into
 *	typedef struct FormData_pg_am
 * ----------------
 */ 
CATALOG(pg_am) {
    char16 	amname;
    oid 	amowner;
    char	amkind;
    int2 	amstrategies;
    int2 	amsupport;
    regproc 	amgettuple;
    regproc	aminsert;
    regproc 	amdelete;
    regproc 	amgetattr;
    regproc 	amsetlock;
    regproc 	amsettid;
    regproc	amfreetuple;
    regproc 	ambeginscan;
    regproc 	amrescan;
    regproc 	amendscan;
    regproc 	ammarkpos;
    regproc 	amrestrpos;
    regproc 	amopen;
    regproc 	amclose;
    regproc 	ambuild;
    regproc 	amcreate; 
    regproc 	amdestroy;
} FormData_pg_am;

/* ----------------
 *	Form_pg_am corresponds to a pointer to a tuple with
 *	the format of pg_am relation.
 * ----------------
 */
typedef FormData_pg_am	*Form_pg_am;

/* ----------------
 *	compiler constants for pg_am
 * ----------------
 */
#define Name_pg_am			"pg_am"
#define Natts_pg_am			22
#define Anum_pg_am_amname		1
#define Anum_pg_am_amowner		2
#define Anum_pg_am_amkind		3
#define Anum_pg_am_amstrategies		4
#define Anum_pg_am_amsupport		5
#define Anum_pg_am_amgettuple		6
#define Anum_pg_am_aminsert		7
#define Anum_pg_am_amdelete		8
#define Anum_pg_am_amgetattr		9
#define Anum_pg_am_amsetlock		10
#define Anum_pg_am_amsettid		11
#define Anum_pg_am_amfreetuple		12
#define Anum_pg_am_ambeginscan		13
#define Anum_pg_am_amrescan		14
#define Anum_pg_am_amendscan		15
#define Anum_pg_am_ammarkpos		16
#define Anum_pg_am_amrestrpos		17
#define Anum_pg_am_amopen		18
#define Anum_pg_am_amclose		19
#define Anum_pg_am_ambuild		20
#define Anum_pg_am_amcreate		21
#define Anum_pg_am_amdestroy		22

/* ----------------
 *	initial contents of pg_am
 * ----------------
 */

DATA(insert OID = 400 (  oldbtree 6 "o" 5 0 btreegettuple btreeinsert btreedelete - - - - btreebeginscan btreerescan btreeendscan btreemarkpos btreerestrpos - - btreebuild - - ));
DATA(insert OID = 401 (  fbtree 6 "o" 5 0 fbtreegettuple fbtreeinsert fbtreedelete - - - - - - - - - - - fbtreebuild - - ));
DATA(insert OID = 402 (  rtree 6 "o" 8 3 rtgettuple rtinsert rtdelete - - - - rtbeginscan rtrescan rtendscan rtmarkpos rtrestrpos - - rtbuild - - ));
DATA(insert OID = 403 (  btree 6 "o" 5 1 btgettuple btinsert btdelete - - - - btbeginscan btrescan btendscan btmarkpos btrestrpos - - btbuild - - ));

BKI_BEGIN
#ifdef NOBTREE
BKI_END
DATA(insert OID = 404 (  nobtree 6 "o" 5 1 nobtgettuple nobtinsert nobtdelete - - - - nobtbeginscan nobtrescan nobtendscan nobtmarkpos nobtrestrpos - - nobtbuild - - ));
BKI_BEGIN
#endif NOBTREE
BKI_END

/* ----------------
 *	old definition of AccessMethodTupleForm
 * ----------------
 */
#ifndef AccessMethodTupleForm_Defined
#define AccessMethodTupleForm_Defined 1

typedef struct AccessMethodTupleFormD {
	NameData	amname;
	ObjectId	amowner;
	char		amkind;		/* XXX */
/*	typedef uint16	StrategyNumber; */
	uint16		amstrategies;
	uint16		amsupport;
	RegProcedure	amgettuple;
	RegProcedure	aminsert;
	RegProcedure	amdelete;
	RegProcedure	amgetattr;
	RegProcedure	amsetlock;
	RegProcedure	amsettid;
	RegProcedure	amfreetuple;
	RegProcedure	ambeginscan;
	RegProcedure	amrescan;
	RegProcedure	amendscan;
	RegProcedure	ammarkpos;
	RegProcedure	amrestrpos;
	RegProcedure	amopen;
	RegProcedure	amclose;
	RegProcedure	ambuild;
	RegProcedure	amcreate;
	RegProcedure	amdestroy;
} AccessMethodTupleFormD;

typedef AccessMethodTupleFormD		*AccessMethodTupleForm;

#endif AccessMethodTupleForm_Defined

/* ----------------
 *	old definition of struct am
 * ----------------
 */
#ifndef struct_am_Defined
#define struct_am_Defined 1

struct	am {
	char	amname[16];
	OID	amowner;
	char	amkind;
	uint16  amstrategies;
	uint16  amsupport;
	REGPROC	amgettuple;
	REGPROC	aminsert;
	REGPROC	amdelete;
	REGPROC	amgetattr;
	REGPROC	amsetlock;
	REGPROC	amsettid;
	REGPROC	amfreetuple;
	REGPROC	ambeginscan;
	REGPROC	amrescan;
	REGPROC	amendscan;
	REGPROC	ammarkpos;
	REGPROC	amrestrpos;
	REGPROC	amopen;
	REGPROC	amclose;
	REGPROC	ambuild;
	REGPROC	amcreate;
	REGPROC	amdestroy;
};

#endif struct_am_Defined

/* ----------------
 *	old style compiler constants.  these are obsolete and
 *	should not be used -cim 6/17/90
 * ----------------
 */
#define AccessMethodNameAttributeNumber	\
    Anum_pg_am_amname
    
#endif PgAmIncluded
@


1.8
log
@need to do a rain dance to get past bki file generation funnies
@
text
@d14 1
a14 1
 *	$Header: /users/mao/postgres/src/lib/H/catalog/RCS/pg_am.h,v 1.7 1991/06/26 19:15:38 mao Exp mao $
d101 1
a101 1
DATA(insert OID = 402 (  rtree 6 "o" 5 3 rtgettuple rtinsert rtdelete - - - - rtbeginscan rtrescan rtendscan rtmarkpos rtrestrpos - - rtbuild - - ));
@


1.7
log
@compile-time switch for including nobtree code
@
text
@d14 1
a14 1
 *	$Header: /users/mao/postgres/src/lib/H/catalog/RCS/pg_am.h,v 1.6 1991/04/24 19:04:05 mao Exp mao $
d104 1
d106 1
d108 1
d110 1
@


1.6
log
@new btree access method added; old access method is now 'oldbtree'.
@
text
@d14 1
a14 1
 *	$Header: RCS/pg_am.h,v 1.5 91/02/24 09:06:00 mao Exp Locker: mao $
d103 4
@


1.5
log
@bad rescan proc for rtrees fixed
@
text
@d14 1
a14 1
 *	$Header: RCS/pg_am.h,v 1.4 91/02/19 13:59:18 mao Exp Locker: mao $
d99 1
a99 1
DATA(insert OID = 400 (  btree 6 "o" 5 0 btreegettuple btreeinsert btreedelete - - - - btbeginscan btreerescan btreeendscan btreemarkpos btreerestrpos - - btreebuild - - ));
d102 1
@


1.4
log
@new rtree code installed
@
text
@d14 1
a14 1
 *	$Header: RCS/pg_am.h,v 1.3 90/08/17 08:51:36 cimarron Exp Locker: mao $
d101 1
a101 1
DATA(insert OID = 402 (  rtree 6 "o" 5 0 rtgettuple rtinsert rtdelete - - - - rtbeginscan btrescan rtendscan rtmarkpos rtrestrpos - - rtbuild - - ));
@


1.3
log
@added pathnames to #include statements
@
text
@d14 1
a14 1
 *	$Header: RCS/pg_am.h,v 1.2 90/08/08 08:19:40 cimarron Exp Locker: cimarron $
d38 1
d70 1
a70 1
#define Natts_pg_am			21
d75 18
a92 17
#define Anum_pg_am_amgettuple		5
#define Anum_pg_am_aminsert		6
#define Anum_pg_am_amdelete		7
#define Anum_pg_am_amgetattr		8
#define Anum_pg_am_amsetlock		9
#define Anum_pg_am_amsettid		10
#define Anum_pg_am_amfreetuple		11
#define Anum_pg_am_ambeginscan		12
#define Anum_pg_am_amrescan		13
#define Anum_pg_am_amendscan		14
#define Anum_pg_am_ammarkpos		15
#define Anum_pg_am_amrestrpos		16
#define Anum_pg_am_amopen		17
#define Anum_pg_am_amclose		18
#define Anum_pg_am_ambuild		19
#define Anum_pg_am_amcreate		20
#define Anum_pg_am_amdestroy		21
d99 3
a101 3
DATA(insert OID = 400 (  btree 6 "o" 5 btreegettuple btreeinsert btreedelete - - - - btbeginscan btreerescan btreeendscan btreemarkpos btreerestrpos - - btreebuild - - ));
DATA(insert OID = 401 (  fbtree 6 "o" 5 fbtreegettuple fbtreeinsert fbtreedelete - - - - - - - - - - - fbtreebuild - - ));
DATA(insert OID = 402 (  rtree 6 "o" 5 rtreegettuple rtreeinsert rtreedelete - - - - rtbeginscan btrescan rtendscan rtmarkpos rtrestrpos - - rtreebuild - - ));
d116 1
d152 1
a173 1
    
@


1.2
log
@reorganized some header files
@
text
@d14 1
a14 1
 *	$Header: RCS/pg_am.h,v 1.1 90/06/18 16:16:06 cimarron Version_2 Locker: cimarron $
d26 1
a26 1
#include "postgres.h"
@


1.1
log
@Initial version.  The new setup is for lib/H/catalog to contain
a pg_xxx.h file for each pg_xxx database in the system catalogs.
This .h file contains CATALOG() and DATA() statements used to
generate typedefs for the catalog tuple structures as well as
initialization scripts for createdb.
@
text
@d14 1
a14 1
 *	$Header$
d21 3
a23 3
 *	catmacros.h defines the CATALOG(), BOOTSTRAP and
 *	DATA() sugar words so this file can be read by both
 *	genbki.sh and the C compiler.
d26 1
a26 1
#include "catalog/catmacros.h"
@
