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.57 2008/07/11 21:06:29 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 regproc aminsert; /* "insert this tuple" function */
52 regproc ambeginscan; /* "start new scan" function */
53 regproc amgettuple; /* "next valid tuple" function */
54 regproc amgetbitmap; /* "fetch all valid tuples" function */
55 regproc amrescan; /* "restart this scan" function */
56 regproc amendscan; /* "end this scan" function */
57 regproc ammarkpos; /* "mark current scan position" function */
58 regproc amrestrpos; /* "restore marked scan position" function */
59 regproc ambuild; /* "build new index" function */
60 regproc ambulkdelete; /* bulk-delete function */
61 regproc amvacuumcleanup; /* post-VACUUM cleanup function */
62 regproc amcostestimate; /* estimate cost of an indexscan */
63 regproc amoptions; /* parse AM-specific parameters */
67 * Form_pg_am corresponds to a pointer to a tuple with
68 * the format of pg_am relation.
71 typedef FormData_pg_am *Form_pg_am;
74 * compiler constants for pg_am
77 #define Natts_pg_am 24
78 #define Anum_pg_am_amname 1
79 #define Anum_pg_am_amstrategies 2
80 #define Anum_pg_am_amsupport 3
81 #define Anum_pg_am_amcanorder 4
82 #define Anum_pg_am_amcanunique 5
83 #define Anum_pg_am_amcanmulticol 6
84 #define Anum_pg_am_amoptionalkey 7
85 #define Anum_pg_am_amindexnulls 8
86 #define Anum_pg_am_amsearchnulls 9
87 #define Anum_pg_am_amstorage 10
88 #define Anum_pg_am_amclusterable 11
89 #define Anum_pg_am_aminsert 12
90 #define Anum_pg_am_ambeginscan 13
91 #define Anum_pg_am_amgettuple 14
92 #define Anum_pg_am_amgetbitmap 15
93 #define Anum_pg_am_amrescan 16
94 #define Anum_pg_am_amendscan 17
95 #define Anum_pg_am_ammarkpos 18
96 #define Anum_pg_am_amrestrpos 19
97 #define Anum_pg_am_ambuild 20
98 #define Anum_pg_am_ambulkdelete 21
99 #define Anum_pg_am_amvacuumcleanup 22
100 #define Anum_pg_am_amcostestimate 23
101 #define Anum_pg_am_amoptions 24
104 * initial contents of pg_am
108 DATA(insert OID = 403 ( btree 5 1 t t t t t t f t btinsert btbeginscan btgettuple btgetbitmap btrescan btendscan btmarkpos btrestrpos btbuild btbulkdelete btvacuumcleanup btcostestimate btoptions ));
109 DESCR("b-tree index access method");
110 #define BTREE_AM_OID 403
111 DATA(insert OID = 405 ( hash 1 1 f f f f f f f f hashinsert hashbeginscan hashgettuple hashgetbitmap hashrescan hashendscan hashmarkpos hashrestrpos hashbuild hashbulkdelete hashvacuumcleanup hashcostestimate hashoptions ));
112 DESCR("hash index access method");
113 #define HASH_AM_OID 405
114 DATA(insert OID = 783 ( gist 0 7 f f t t t t t t gistinsert gistbeginscan gistgettuple gistgetbitmap gistrescan gistendscan gistmarkpos gistrestrpos gistbuild gistbulkdelete gistvacuumcleanup gistcostestimate gistoptions ));
115 DESCR("GiST index access method");
116 #define GIST_AM_OID 783
117 DATA(insert OID = 2742 ( gin 0 5 f f t t f f t f gininsert ginbeginscan gingettuple gingetbitmap ginrescan ginendscan ginmarkpos ginrestrpos ginbuild ginbulkdelete ginvacuumcleanup gincostestimate ginoptions ));
118 DESCR("GIN index access method");
119 #define GIN_AM_OID 2742