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