1 /*-------------------------------------------------------------------------
4 * definition of the system "access method" relation (pg_am)
5 * along with the relation's initial contents.
8 * Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
9 * Portions Copyright (c) 1994, Regents of the University of California
11 * $PostgreSQL: pgsql/src/include/catalog/pg_am.h,v 1.46 2006/07/31 20:09:05 tgl Exp $
14 * the genbki.sh script reads this file and generates .bki
15 * information from the DATA() statements.
17 * XXX do NOT break up DATA() statements into multiple lines!
18 * the scripts are not as smart as you might think...
20 *-------------------------------------------------------------------------
26 * postgres.h contains the system type definitions and the
27 * CATALOG(), BKI_BOOTSTRAP and DATA() sugar words so this file
28 * can be read by both genbki.sh and the C compiler.
33 * pg_am definition. cpp turns this into
34 * typedef struct FormData_pg_am
37 #define AccessMethodRelationId 2601
41 NameData amname; /* access method name */
42 int2 amstrategies; /* total NUMBER of strategies (operators) by
43 * which we can traverse/search this AM */
44 int2 amsupport; /* total NUMBER of support functions that this
46 int2 amorderstrategy;/* if this AM has a sort order, the strategy
47 * number of the sort operator. Zero if AM is
49 bool amcanunique; /* does AM support UNIQUE indexes? */
50 bool amcanmulticol; /* does AM support multi-column indexes? */
51 bool amoptionalkey; /* can query omit key for the first column? */
52 bool amindexnulls; /* does AM support NULL index entries? */
53 bool amstorage; /* can storage type differ from column type? */
54 bool amclusterable; /* does AM support cluster command? */
55 regproc aminsert; /* "insert this tuple" function */
56 regproc ambeginscan; /* "start new scan" function */
57 regproc amgettuple; /* "next valid tuple" function */
58 regproc amgetmulti; /* "fetch multiple tuples" function */
59 regproc amrescan; /* "restart this scan" function */
60 regproc amendscan; /* "end this scan" function */
61 regproc ammarkpos; /* "mark current scan position" function */
62 regproc amrestrpos; /* "restore marked scan position" function */
63 regproc ambuild; /* "build new index" function */
64 regproc ambulkdelete; /* bulk-delete function */
65 regproc amvacuumcleanup; /* post-VACUUM cleanup function */
66 regproc amcostestimate; /* estimate cost of an indexscan */
67 regproc amoptions; /* parse AM-specific parameters */
71 * Form_pg_am corresponds to a pointer to a tuple with
72 * the format of pg_am relation.
75 typedef FormData_pg_am *Form_pg_am;
78 * compiler constants for pg_am
81 #define Natts_pg_am 23
82 #define Anum_pg_am_amname 1
83 #define Anum_pg_am_amstrategies 2
84 #define Anum_pg_am_amsupport 3
85 #define Anum_pg_am_amorderstrategy 4
86 #define Anum_pg_am_amcanunique 5
87 #define Anum_pg_am_amcanmulticol 6
88 #define Anum_pg_am_amoptionalkey 7
89 #define Anum_pg_am_amindexnulls 8
90 #define Anum_pg_am_amstorage 9
91 #define Anum_pg_am_amclusterable 10
92 #define Anum_pg_am_aminsert 11
93 #define Anum_pg_am_ambeginscan 12
94 #define Anum_pg_am_amgettuple 13
95 #define Anum_pg_am_amgetmulti 14
96 #define Anum_pg_am_amrescan 15
97 #define Anum_pg_am_amendscan 16
98 #define Anum_pg_am_ammarkpos 17
99 #define Anum_pg_am_amrestrpos 18
100 #define Anum_pg_am_ambuild 19
101 #define Anum_pg_am_ambulkdelete 20
102 #define Anum_pg_am_amvacuumcleanup 21
103 #define Anum_pg_am_amcostestimate 22
104 #define Anum_pg_am_amoptions 23
107 * initial contents of pg_am
111 DATA(insert OID = 403 ( btree 5 1 1 t t t t f t btinsert btbeginscan btgettuple btgetmulti btrescan btendscan btmarkpos btrestrpos btbuild btbulkdelete btvacuumcleanup btcostestimate btoptions ));
112 DESCR("b-tree index access method");
113 #define BTREE_AM_OID 403
114 DATA(insert OID = 405 ( hash 1 1 0 f f f f f f hashinsert hashbeginscan hashgettuple hashgetmulti hashrescan hashendscan hashmarkpos hashrestrpos hashbuild hashbulkdelete hashvacuumcleanup hashcostestimate hashoptions ));
115 DESCR("hash index access method");
116 #define HASH_AM_OID 405
117 DATA(insert OID = 783 ( gist 100 7 0 f t t t t t gistinsert gistbeginscan gistgettuple gistgetmulti gistrescan gistendscan gistmarkpos gistrestrpos gistbuild gistbulkdelete gistvacuumcleanup gistcostestimate gistoptions ));
118 DESCR("GiST index access method");
119 #define GIST_AM_OID 783
120 DATA(insert OID = 2742 ( gin 100 4 0 f f f f t f gininsert ginbeginscan gingettuple gingetmulti ginrescan ginendscan ginmarkpos ginrestrpos ginbuild ginbulkdelete ginvacuumcleanup gincostestimate ginoptions ));
121 DESCR("GIN index access method");
122 #define GIN_AM_OID 2742