1 /*-------------------------------------------------------------------------
4 * definition of the system "access method" relation (pg_am)
5 * along with the relation's initial contents.
8 * Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
9 * Portions Copyright (c) 1994, Regents of the University of California
11 * src/include/catalog/pg_am.h
14 * the genbki.pl 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 order by column value? */
44 bool amcanorderbyop; /* does AM support order by operator result? */
45 bool amcanbackward; /* does AM support backward scan? */
46 bool amcanunique; /* does AM support UNIQUE indexes? */
47 bool amcanmulticol; /* does AM support multi-column indexes? */
48 bool amoptionalkey; /* can query omit key for the first column? */
49 bool amindexnulls; /* does AM support NULL index entries? */
50 bool amsearchnulls; /* can AM search for NULL/NOT NULL entries? */
51 bool amstorage; /* can storage type differ from column type? */
52 bool amclusterable; /* does AM support cluster command? */
53 Oid amkeytype; /* type of data in index, or InvalidOid */
54 regproc aminsert; /* "insert this tuple" function */
55 regproc ambeginscan; /* "prepare for index scan" function */
56 regproc amgettuple; /* "next valid tuple" function, or 0 */
57 regproc amgetbitmap; /* "fetch all valid tuples" function, or 0 */
58 regproc amrescan; /* "(re)start index scan" function */
59 regproc amendscan; /* "end index scan" function */
60 regproc ammarkpos; /* "mark current scan position" function */
61 regproc amrestrpos; /* "restore marked scan position" function */
62 regproc ambuild; /* "build new index" function */
63 regproc ambuildempty; /* "build empty 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 27
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_amcanorder 4
86 #define Anum_pg_am_amcanorderbyop 5
87 #define Anum_pg_am_amcanbackward 6
88 #define Anum_pg_am_amcanunique 7
89 #define Anum_pg_am_amcanmulticol 8
90 #define Anum_pg_am_amoptionalkey 9
91 #define Anum_pg_am_amindexnulls 10
92 #define Anum_pg_am_amsearchnulls 11
93 #define Anum_pg_am_amstorage 12
94 #define Anum_pg_am_amclusterable 13
95 #define Anum_pg_am_amkeytype 14
96 #define Anum_pg_am_aminsert 15
97 #define Anum_pg_am_ambeginscan 16
98 #define Anum_pg_am_amgettuple 17
99 #define Anum_pg_am_amgetbitmap 18
100 #define Anum_pg_am_amrescan 19
101 #define Anum_pg_am_amendscan 20
102 #define Anum_pg_am_ammarkpos 21
103 #define Anum_pg_am_amrestrpos 22
104 #define Anum_pg_am_ambuild 23
105 #define Anum_pg_am_ambuildempty 24
106 #define Anum_pg_am_ambulkdelete 25
107 #define Anum_pg_am_amvacuumcleanup 26
108 #define Anum_pg_am_amcostestimate 27
109 #define Anum_pg_am_amoptions 28
112 * initial contents of pg_am
116 DATA(insert OID = 403 ( btree 5 1 t f t t t t t t f t 0 btinsert btbeginscan btgettuple btgetbitmap btrescan btendscan btmarkpos btrestrpos btbuild btbuildempty btbulkdelete btvacuumcleanup btcostestimate btoptions ));
117 DESCR("b-tree index access method");
118 #define BTREE_AM_OID 403
119 DATA(insert OID = 405 ( hash 1 1 f f t f f f f f f f 23 hashinsert hashbeginscan hashgettuple hashgetbitmap hashrescan hashendscan hashmarkpos hashrestrpos hashbuild hashbuildempty hashbulkdelete hashvacuumcleanup hashcostestimate hashoptions ));
120 DESCR("hash index access method");
121 #define HASH_AM_OID 405
122 DATA(insert OID = 783 ( gist 0 8 f t f f t t t t t t 0 gistinsert gistbeginscan gistgettuple gistgetbitmap gistrescan gistendscan gistmarkpos gistrestrpos gistbuild gistbuildempty gistbulkdelete gistvacuumcleanup gistcostestimate gistoptions ));
123 DESCR("GiST index access method");
124 #define GIST_AM_OID 783
125 DATA(insert OID = 2742 ( gin 0 5 f f f f t t f f t f 0 gininsert ginbeginscan - gingetbitmap ginrescan ginendscan ginmarkpos ginrestrpos ginbuild ginbuildempty ginbulkdelete ginvacuumcleanup gincostestimate ginoptions ));
126 DESCR("GIN index access method");
127 #define GIN_AM_OID 2742