]> granicus.if.org Git - postgresql/blob - src/include/catalog/pg_am.h
Phase 2 of pgindent updates.
[postgresql] / src / include / catalog / pg_am.h
1 /*-------------------------------------------------------------------------
2  *
3  * pg_am.h
4  *        definition of the system "access method" relation (pg_am)
5  *        along with the relation's initial contents.
6  *
7  *
8  * Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
9  * Portions Copyright (c) 1994, Regents of the University of California
10  *
11  * src/include/catalog/pg_am.h
12  *
13  * NOTES
14  *              the genbki.pl script reads this file and generates .bki
15  *              information from the DATA() statements.
16  *
17  *              XXX do NOT break up DATA() statements into multiple lines!
18  *                      the scripts are not as smart as you might think...
19  *
20  *-------------------------------------------------------------------------
21  */
22 #ifndef PG_AM_H
23 #define PG_AM_H
24
25 #include "catalog/genbki.h"
26
27 /* ----------------
28  *              pg_am definition.  cpp turns this into
29  *              typedef struct FormData_pg_am
30  * ----------------
31  */
32 #define AccessMethodRelationId  2601
33
34 CATALOG(pg_am,2601)
35 {
36         NameData        amname;                 /* access method name */
37         regproc         amhandler;              /* handler function */
38         char            amtype;                 /* see AMTYPE_xxx constants below */
39 } FormData_pg_am;
40
41 /* ----------------
42  *              Form_pg_am corresponds to a pointer to a tuple with
43  *              the format of pg_am relation.
44  * ----------------
45  */
46 typedef FormData_pg_am *Form_pg_am;
47
48 /* ----------------
49  *              compiler constants for pg_am
50  * ----------------
51  */
52 #define Natts_pg_am                                             3
53 #define Anum_pg_am_amname                               1
54 #define Anum_pg_am_amhandler                    2
55 #define Anum_pg_am_amtype                               3
56
57 /* ----------------
58  *              compiler constant for amtype
59  * ----------------
60  */
61 #define AMTYPE_INDEX                                    'i' /* index access method */
62
63 /* ----------------
64  *              initial contents of pg_am
65  * ----------------
66  */
67
68 DATA(insert OID = 403 (  btree          bthandler       i ));
69 DESCR("b-tree index access method");
70 #define BTREE_AM_OID 403
71 DATA(insert OID = 405 (  hash           hashhandler i ));
72 DESCR("hash index access method");
73 #define HASH_AM_OID 405
74 DATA(insert OID = 783 (  gist           gisthandler i ));
75 DESCR("GiST index access method");
76 #define GIST_AM_OID 783
77 DATA(insert OID = 2742 (  gin           ginhandler      i ));
78 DESCR("GIN index access method");
79 #define GIN_AM_OID 2742
80 DATA(insert OID = 4000 (  spgist        spghandler      i ));
81 DESCR("SP-GiST index access method");
82 #define SPGIST_AM_OID 4000
83 DATA(insert OID = 3580 (  brin          brinhandler i ));
84 DESCR("block range index (BRIN) access method");
85 #define BRIN_AM_OID 3580
86
87 #endif                                                  /* PG_AM_H */