1 /*-------------------------------------------------------------------------
4 * definition of the system "access method" relation (pg_am)
5 * along with the relation's initial contents.
8 * Portions Copyright (c) 1996-2007, 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.49 2007/01/09 02:14:15 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 * Zero if AM does not have a fixed set of
45 * strategy assignments. */
46 int2 amsupport; /* total number of support functions that this
48 int2 amorderstrategy;/* if this AM has a sort order, the strategy
49 * number of the default (ASC) sort operator.
50 * Zero if AM is not ordered. */
51 int2 amdescorder; /* if this AM has a sort order, the strategy
52 * number of the DESC sort operator.
53 * Zero if AM is not ordered. */
54 bool amcanunique; /* does AM support UNIQUE indexes? */
55 bool amcanmulticol; /* does AM support multi-column indexes? */
56 bool amoptionalkey; /* can query omit key for the first column? */
57 bool amindexnulls; /* does AM support NULL index entries? */
58 bool amstorage; /* can storage type differ from column type? */
59 bool amclusterable; /* does AM support cluster command? */
60 regproc aminsert; /* "insert this tuple" function */
61 regproc ambeginscan; /* "start new scan" function */
62 regproc amgettuple; /* "next valid tuple" function */
63 regproc amgetmulti; /* "fetch multiple tuples" function */
64 regproc amrescan; /* "restart this scan" function */
65 regproc amendscan; /* "end this scan" function */
66 regproc ammarkpos; /* "mark current scan position" function */
67 regproc amrestrpos; /* "restore marked scan position" function */
68 regproc ambuild; /* "build new index" function */
69 regproc ambulkdelete; /* bulk-delete function */
70 regproc amvacuumcleanup; /* post-VACUUM cleanup function */
71 regproc amcostestimate; /* estimate cost of an indexscan */
72 regproc amoptions; /* parse AM-specific parameters */
76 * Form_pg_am corresponds to a pointer to a tuple with
77 * the format of pg_am relation.
80 typedef FormData_pg_am *Form_pg_am;
83 * compiler constants for pg_am
86 #define Natts_pg_am 24
87 #define Anum_pg_am_amname 1
88 #define Anum_pg_am_amstrategies 2
89 #define Anum_pg_am_amsupport 3
90 #define Anum_pg_am_amorderstrategy 4
91 #define Anum_pg_am_amdescorder 5
92 #define Anum_pg_am_amcanunique 6
93 #define Anum_pg_am_amcanmulticol 7
94 #define Anum_pg_am_amoptionalkey 8
95 #define Anum_pg_am_amindexnulls 9
96 #define Anum_pg_am_amstorage 10
97 #define Anum_pg_am_amclusterable 11
98 #define Anum_pg_am_aminsert 12
99 #define Anum_pg_am_ambeginscan 13
100 #define Anum_pg_am_amgettuple 14
101 #define Anum_pg_am_amgetmulti 15
102 #define Anum_pg_am_amrescan 16
103 #define Anum_pg_am_amendscan 17
104 #define Anum_pg_am_ammarkpos 18
105 #define Anum_pg_am_amrestrpos 19
106 #define Anum_pg_am_ambuild 20
107 #define Anum_pg_am_ambulkdelete 21
108 #define Anum_pg_am_amvacuumcleanup 22
109 #define Anum_pg_am_amcostestimate 23
110 #define Anum_pg_am_amoptions 24
113 * initial contents of pg_am
117 DATA(insert OID = 403 ( btree 5 1 1 5 t t t t f t btinsert btbeginscan btgettuple btgetmulti btrescan btendscan btmarkpos btrestrpos btbuild btbulkdelete btvacuumcleanup btcostestimate btoptions ));
118 DESCR("b-tree index access method");
119 #define BTREE_AM_OID 403
120 DATA(insert OID = 405 ( hash 1 1 0 0 f f f f f f hashinsert hashbeginscan hashgettuple hashgetmulti hashrescan hashendscan hashmarkpos hashrestrpos hashbuild hashbulkdelete hashvacuumcleanup hashcostestimate hashoptions ));
121 DESCR("hash index access method");
122 #define HASH_AM_OID 405
123 DATA(insert OID = 783 ( gist 0 7 0 0 f t t t t t gistinsert gistbeginscan gistgettuple gistgetmulti gistrescan gistendscan gistmarkpos gistrestrpos gistbuild gistbulkdelete gistvacuumcleanup gistcostestimate gistoptions ));
124 DESCR("GiST index access method");
125 #define GIST_AM_OID 783
126 DATA(insert OID = 2742 ( gin 0 4 0 0 f f f f t f gininsert ginbeginscan gingettuple gingetmulti ginrescan ginendscan ginmarkpos ginrestrpos ginbuild ginbulkdelete ginvacuumcleanup gincostestimate ginoptions ));
127 DESCR("GIN index access method");
128 #define GIN_AM_OID 2742