]> granicus.if.org Git - postgresql/blob - src/include/catalog/pg_am.h
Update copyright to 2002.
[postgresql] / src / include / catalog / pg_am.h
1 /*-------------------------------------------------------------------------
2  *
3  * pg_am.h
4  *        definition of the system "am" relation (pg_am)
5  *        along with the relation's initial contents.
6  *
7  *
8  * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
9  * Portions Copyright (c) 1994, Regents of the University of California
10  *
11  * $Id: pg_am.h,v 1.22 2002/06/20 20:29:43 momjian Exp $
12  *
13  * NOTES
14  *              the genbki.sh 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 /* ----------------
26  *              postgres.h contains the system type definintions and the
27  *              CATALOG(), BOOTSTRAP and DATA() sugar words so this file
28  *              can be read by both genbki.sh and the C compiler.
29  * ----------------
30  */
31
32 /* ----------------
33  *              pg_am definition.  cpp turns this into
34  *              typedef struct FormData_pg_am
35  * ----------------
36  */
37 CATALOG(pg_am)
38 {
39         NameData        amname;                 /* access method name */
40         int4            amowner;                /* usesysid of creator */
41         int2            amstrategies;   /* total NUMBER of strategies (operators)
42                                                                  * by which we can traverse/search this AM */
43         int2            amsupport;              /* total NUMBER of support functions that
44                                                                  * this AM uses */
45         int2            amorderstrategy;/* if this AM has a sort order, the
46                                                                  * strategy number of the sort operator.
47                                                                  * Zero if AM is not ordered. */
48         bool            amcanunique;    /* does AM support UNIQUE indexes? */
49         bool            amcanmulticol;  /* does AM support multi-column indexes? */
50         bool            amindexnulls;   /* does AM support NULL index entries? */
51         bool            amconcurrent;   /* does AM support concurrent updates? */
52         regproc         amgettuple;             /* "next valid tuple" function */
53         regproc         aminsert;               /* "insert this tuple" function */
54         regproc         ambeginscan;    /* "start new scan" 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         amcostestimate; /* estimate cost of an indexscan */
62 } FormData_pg_am;
63
64 /* ----------------
65  *              Form_pg_am corresponds to a pointer to a tuple with
66  *              the format of pg_am relation.
67  * ----------------
68  */
69 typedef FormData_pg_am *Form_pg_am;
70
71 /* ----------------
72  *              compiler constants for pg_am
73  * ----------------
74  */
75 #define Natts_pg_am                                             19
76 #define Anum_pg_am_amname                               1
77 #define Anum_pg_am_amowner                              2
78 #define Anum_pg_am_amstrategies                 3
79 #define Anum_pg_am_amsupport                    4
80 #define Anum_pg_am_amorderstrategy              5
81 #define Anum_pg_am_amcanunique                  6
82 #define Anum_pg_am_amcanmulticol                7
83 #define Anum_pg_am_amindexnulls                 8
84 #define Anum_pg_am_amconcurrent                 9
85 #define Anum_pg_am_amgettuple                   10
86 #define Anum_pg_am_aminsert                             11
87 #define Anum_pg_am_ambeginscan                  12
88 #define Anum_pg_am_amrescan                             13
89 #define Anum_pg_am_amendscan                    14
90 #define Anum_pg_am_ammarkpos                    15
91 #define Anum_pg_am_amrestrpos                   16
92 #define Anum_pg_am_ambuild                              17
93 #define Anum_pg_am_ambulkdelete                 18
94 #define Anum_pg_am_amcostestimate               19
95
96 /* ----------------
97  *              initial contents of pg_am
98  * ----------------
99  */
100
101 DATA(insert OID = 402 (  rtree  PGUID   8 3 0 f f f f rtgettuple rtinsert rtbeginscan rtrescan rtendscan rtmarkpos rtrestrpos rtbuild rtbulkdelete rtcostestimate ));
102 DESCR("r-tree index access method");
103 DATA(insert OID = 403 (  btree  PGUID   5 1 1 t t t t btgettuple btinsert btbeginscan btrescan btendscan btmarkpos btrestrpos btbuild btbulkdelete btcostestimate ));
104 DESCR("b-tree index access method");
105 #define BTREE_AM_OID 403
106 DATA(insert OID = 405 (  hash   PGUID   1 1 0 f f f t hashgettuple hashinsert hashbeginscan hashrescan hashendscan hashmarkpos hashrestrpos hashbuild hashbulkdelete hashcostestimate ));
107 DESCR("hash index access method");
108 DATA(insert OID = 783 (  gist   PGUID 100 7 0 f t f f gistgettuple gistinsert gistbeginscan gistrescan gistendscan gistmarkpos gistrestrpos gistbuild gistbulkdelete gistcostestimate ));
109 DESCR("GiST index access method");
110
111 #endif   /* PG_AM_H */