summaryrefslogtreecommitdiff
path: root/src/include/catalog/pg_am.h
blob: 3bf79404d8e23f64c4f0b02330bc87701a3b062e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
/*-------------------------------------------------------------------------
 *
 * pg_am.h
 *	  definition of the system "am" relation (pg_am)
 *	  along with the relation's initial contents.
 *
 *
 * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
 * Portions Copyright (c) 1994, Regents of the University of California
 *
 * $Id: pg_am.h,v 1.18 2001/07/15 22:48:18 tgl Exp $
 *
 * NOTES
 *		the genbki.sh script reads this file and generates .bki
 *		information from the DATA() statements.
 *
 *		XXX do NOT break up DATA() statements into multiple lines!
 *			the scripts are not as smart as you might think...
 *
 *-------------------------------------------------------------------------
 */
#ifndef PG_AM_H
#define PG_AM_H

/* ----------------
 *		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.
 * ----------------
 */

/* ----------------
 *		pg_am definition.  cpp turns this into
 *		typedef struct FormData_pg_am
 * ----------------
 */
CATALOG(pg_am)
{
	NameData	amname;			/* access method name */
	int4		amowner;		/* usesysid of creator */
	int2		amstrategies;	/* total NUMBER of strategies (operators) by
								 * which we can traverse/search this AM */
	int2		amsupport;		/* total NUMBER of support functions that
								 * this AM uses */
	int2		amorderstrategy;/* if this AM has a sort order, the
								 * strategy number of the sort operator.
								 * Zero if AM is not ordered. */
	bool		amcanunique;	/* does AM support UNIQUE indexes? */
	bool		amcanmulticol;	/* does AM support multi-column indexes? */
	bool		amindexnulls;	/* does AM support NULL index entries? */
	bool		amconcurrent;	/* does AM support concurrent updates? */
	regproc		amgettuple;		/* "next valid tuple" function */
	regproc		aminsert;		/* "insert this tuple" function */
	regproc		ambeginscan;	/* "start new scan" function */
	regproc		amrescan;		/* "restart this scan" function */
	regproc		amendscan;		/* "end this scan" function */
	regproc		ammarkpos;		/* "mark current scan position" function */
	regproc		amrestrpos;		/* "restore marked scan position" function */
	regproc		ambuild;		/* "build new index" function */
	regproc		ambulkdelete;	/* bulk-delete function */
	regproc		amcostestimate; /* estimate cost of an indexscan */
} 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 Natts_pg_am						19
#define Anum_pg_am_amname				1
#define Anum_pg_am_amowner				2
#define Anum_pg_am_amstrategies			3
#define Anum_pg_am_amsupport			4
#define Anum_pg_am_amorderstrategy		5
#define Anum_pg_am_amcanunique			6
#define Anum_pg_am_amcanmulticol		7
#define Anum_pg_am_amindexnulls			8
#define Anum_pg_am_amconcurrent			9
#define Anum_pg_am_amgettuple			10
#define Anum_pg_am_aminsert				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_ambuild				17
#define Anum_pg_am_ambulkdelete			18
#define Anum_pg_am_amcostestimate		19

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

DATA(insert OID = 402 (  rtree	PGUID   8 3 0 f f f f rtgettuple rtinsert rtbeginscan rtrescan rtendscan rtmarkpos rtrestrpos rtbuild rtbulkdelete rtcostestimate ));
DESCR("r-tree index access method");
DATA(insert OID = 403 (  btree	PGUID   5 1 1 t t t t btgettuple btinsert btbeginscan btrescan btendscan btmarkpos btrestrpos btbuild btbulkdelete btcostestimate ));
DESCR("b-tree index access method");
#define BTREE_AM_OID 403
DATA(insert OID = 405 (  hash	PGUID   1 1 0 f f f t hashgettuple hashinsert hashbeginscan hashrescan hashendscan hashmarkpos hashrestrpos hashbuild hashbulkdelete hashcostestimate ));
DESCR("hash index access method");
DATA(insert OID = 783 (  gist	PGUID 100 7 0 f t f f gistgettuple gistinsert gistbeginscan gistrescan gistendscan gistmarkpos gistrestrpos gistbuild gistbulkdelete gistcostestimate ));
DESCR("GiST index access method");

#endif	 /* PG_AM_H */