1 /*-------------------------------------------------------------------------
4 * definition of the system "access method" relation (pg_am)
5 * along with the relation's initial contents.
8 * Portions Copyright (c) 1996-2008, 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.58 2008/09/15 18:43:41 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 *-------------------------------------------------------------------------
25 #include "catalog/genbki.h"
28 * pg_am definition. cpp turns this into
29 * typedef struct FormData_pg_am
32 #define AccessMethodRelationId 2601
36 NameData amname; /* access method name */
37 int2 amstrategies; /* total number of strategies (operators) by
38 * which we can traverse/search this AM. Zero
39 * if AM does not have a fixed set of strategy
41 int2 amsupport; /* total number of support functions that this
43 bool amcanorder; /* does AM support ordered scan results? */
44 bool amcanunique; /* does AM support UNIQUE indexes? */
45 bool amcanmulticol; /* does AM support multi-column indexes? */
46 bool amoptionalkey; /* can query omit key for the first column? */
47 bool amindexnulls; /* does AM support NULL index entries? */
48 bool amsearchnulls; /* can AM search for NULL index entries? */
49 bool amstorage; /* can storage type differ from column type? */
50 bool amclusterable; /* does AM support cluster command? */
51 Oid amkeytype; /* type of data in index, or InvalidOid */
52 regproc aminsert; /* "insert this tuple" function */
53 regproc ambeginscan; /* "start new scan" function */
54 regproc amgettuple; /* "next valid tuple" function */
55 regproc amgetbitmap; /* "fetch all valid tuples" function */
56 regproc amrescan; /* "restart this scan" function */
57 regproc amendscan; /* "end this scan" function */
58 regproc ammarkpos; /* "mark current scan position" function */
59 regproc amrestrpos; /* "restore marked scan position" function */
60 regproc ambuild; /* "build new index" function */
61 regproc ambulkdelete; /* bulk-delete function */
62 regproc amvacuumcleanup; /* post-VACUUM cleanup function */
63 regproc amcostestimate; /* estimate cost of an indexscan */
64 regproc amoptions; /* parse AM-specific parameters */
68 * Form_pg_am corresponds to a pointer to a tuple with
69 * the format of pg_am relation.
72 typedef FormData_pg_am *Form_pg_am;
75 * compiler constants for pg_am
78 #define Natts_pg_am 25
79 #define Anum_pg_am_amname 1
80 #define Anum_pg_am_amstrategies 2
81 #define Anum_pg_am_amsupport 3
82 #define Anum_pg_am_amcanorder 4
83 #define Anum_pg_am_amcanunique 5
84 #define Anum_pg_am_amcanmulticol 6
85 #define Anum_pg_am_amoptionalkey 7
86 #define Anum_pg_am_amindexnulls 8
87 #define Anum_pg_am_amsearchnulls 9
88 #define Anum_pg_am_amstorage 10
89 #define Anum_pg_am_amclusterable 11
90 #define Anum_pg_am_amkeytype 12
91 #define Anum_pg_am_aminsert 13
92 #define Anum_pg_am_ambeginscan 14
93 #define Anum_pg_am_amgettuple 15
94 #define Anum_pg_am_amgetbitmap 16
95 #define Anum_pg_am_amrescan 17
96 #define Anum_pg_am_amendscan 18
97 #define Anum_pg_am_ammarkpos 19
98 #define Anum_pg_am_amrestrpos 20
99 #define Anum_pg_am_ambuild 21
100 #define Anum_pg_am_ambulkdelete 22
101 #define Anum_pg_am_amvacuumcleanup 23
102 #define Anum_pg_am_amcostestimate 24
103 #define Anum_pg_am_amoptions 25
106 * initial contents of pg_am
110 DATA(insert OID = 403 ( btree 5 1 t t t t t t f t 0 btinsert btbeginscan btgettuple btgetbitmap btrescan btendscan btmarkpos btrestrpos btbuild btbulkdelete btvacuumcleanup btcostestimate btoptions ));
111 DESCR("b-tree index access method");
112 #define BTREE_AM_OID 403
113 DATA(insert OID = 405 ( hash 1 1 f f f f f f f f 23 hashinsert hashbeginscan hashgettuple hashgetbitmap hashrescan hashendscan hashmarkpos hashrestrpos hashbuild hashbulkdelete hashvacuumcleanup hashcostestimate hashoptions ));
114 DESCR("hash index access method");
115 #define HASH_AM_OID 405
116 DATA(insert OID = 783 ( gist 0 7 f f t t t t t t 0 gistinsert gistbeginscan gistgettuple gistgetbitmap gistrescan gistendscan gistmarkpos gistrestrpos gistbuild gistbulkdelete gistvacuumcleanup gistcostestimate gistoptions ));
117 DESCR("GiST index access method");
118 #define GIST_AM_OID 783
119 DATA(insert OID = 2742 ( gin 0 5 f f t t f f t f 0 gininsert ginbeginscan gingettuple gingetbitmap ginrescan ginendscan ginmarkpos ginrestrpos ginbuild ginbulkdelete ginvacuumcleanup gincostestimate ginoptions ));
120 DESCR("GIN index access method");
121 #define GIN_AM_OID 2742