1 /*-------------------------------------------------------------------------
4 * definition of the system "access method" relation (pg_am)
5 * along with the relation's initial contents.
8 * Portions Copyright (c) 1996-2005, 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.32 2005/03/27 23:53:05 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(), 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
39 NameData amname; /* access method name */
40 int2 amstrategies; /* total NUMBER of strategies (operators)
41 * by which we can traverse/search this AM */
42 int2 amsupport; /* total NUMBER of support functions that
44 int2 amorderstrategy;/* if this AM has a sort order, the
45 * strategy number of the sort operator.
46 * Zero if AM is not ordered. */
47 bool amcanunique; /* does AM support UNIQUE indexes? */
48 bool amcanmulticol; /* does AM support multi-column indexes? */
49 bool amindexnulls; /* does AM support NULL index entries? */
50 bool amconcurrent; /* does AM support concurrent updates? */
51 regproc aminsert; /* "insert this tuple" function */
52 regproc ambeginscan; /* "start new scan" function */
53 regproc amgettuple; /* "next valid tuple" function */
54 regproc amgetmulti; /* "fetch multiple 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 */
66 * Form_pg_am corresponds to a pointer to a tuple with
67 * the format of pg_am relation.
70 typedef FormData_pg_am *Form_pg_am;
73 * compiler constants for pg_am
76 #define Natts_pg_am 20
77 #define Anum_pg_am_amname 1
78 #define Anum_pg_am_amstrategies 2
79 #define Anum_pg_am_amsupport 3
80 #define Anum_pg_am_amorderstrategy 4
81 #define Anum_pg_am_amcanunique 5
82 #define Anum_pg_am_amcanmulticol 6
83 #define Anum_pg_am_amindexnulls 7
84 #define Anum_pg_am_amconcurrent 8
85 #define Anum_pg_am_aminsert 9
86 #define Anum_pg_am_ambeginscan 10
87 #define Anum_pg_am_amgettuple 11
88 #define Anum_pg_am_amgetmulti 12
89 #define Anum_pg_am_amrescan 13
90 #define Anum_pg_am_amendscan 14
91 #define Anum_pg_am_ammarkpos 15
92 #define Anum_pg_am_amrestrpos 16
93 #define Anum_pg_am_ambuild 17
94 #define Anum_pg_am_ambulkdelete 18
95 #define Anum_pg_am_amvacuumcleanup 19
96 #define Anum_pg_am_amcostestimate 20
99 * initial contents of pg_am
103 DATA(insert OID = 402 ( rtree 8 3 0 f f f f rtinsert rtbeginscan rtgettuple rtgetmulti rtrescan rtendscan rtmarkpos rtrestrpos rtbuild rtbulkdelete - rtcostestimate ));
104 DESCR("r-tree index access method");
105 DATA(insert OID = 403 ( btree 5 1 1 t t t t btinsert btbeginscan btgettuple btgetmulti btrescan btendscan btmarkpos btrestrpos btbuild btbulkdelete btvacuumcleanup btcostestimate ));
106 DESCR("b-tree index access method");
107 #define BTREE_AM_OID 403
108 DATA(insert OID = 405 ( hash 1 1 0 f f f t hashinsert hashbeginscan hashgettuple hashgetmulti hashrescan hashendscan hashmarkpos hashrestrpos hashbuild hashbulkdelete - hashcostestimate ));
109 DESCR("hash index access method");
110 #define HASH_AM_OID 405
111 DATA(insert OID = 783 ( gist 100 7 0 f t f f gistinsert gistbeginscan gistgettuple gistgetmulti gistrescan gistendscan gistmarkpos gistrestrpos gistbuild gistbulkdelete - gistcostestimate ));
112 DESCR("GiST index access method");
113 #define GIST_AM_OID 783