]> granicus.if.org Git - postgresql/blob - src/include/catalog/pg_rewrite.h
Update copyright to 2004.
[postgresql] / src / include / catalog / pg_rewrite.h
1 /*-------------------------------------------------------------------------
2  *
3  * pg_rewrite.h
4  *        definition of the system "rewrite-rule" relation (pg_rewrite)
5  *        along with the relation's initial contents.
6  *
7  * As of Postgres 7.3, the primary key for this table is <ev_class, rulename>
8  * --- ie, rule names are only unique among the rules of a given table.
9  *
10  *
11  * Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
12  * Portions Copyright (c) 1994, Regents of the University of California
13  *
14  * $PostgreSQL: pgsql/src/include/catalog/pg_rewrite.h,v 1.23 2004/08/29 04:13:05 momjian Exp $
15  *
16  * NOTES
17  *        the genbki.sh script reads this file and generates .bki
18  *        information from the DATA() statements.
19  *
20  *-------------------------------------------------------------------------
21  */
22 #ifndef PG_REWRITE_H
23 #define PG_REWRITE_H
24
25 /* ----------------
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.
29  * ----------------
30  */
31
32 /* ----------------
33  *              pg_rewrite definition.  cpp turns this into
34  *              typedef struct FormData_pg_rewrite
35  * ----------------
36  */
37 CATALOG(pg_rewrite)
38 {
39         NameData        rulename;
40         Oid                     ev_class;
41         int2            ev_attr;
42         char            ev_type;
43         bool            is_instead;
44
45         /* NB: remaining fields must be accessed via heap_getattr */
46         text            ev_qual;
47         text            ev_action;
48 } FormData_pg_rewrite;
49
50 /* ----------------
51  *              Form_pg_rewrite corresponds to a pointer to a tuple with
52  *              the format of pg_rewrite relation.
53  * ----------------
54  */
55 typedef FormData_pg_rewrite *Form_pg_rewrite;
56
57 /* ----------------
58  *              compiler constants for pg_rewrite
59  * ----------------
60  */
61 #define Natts_pg_rewrite                                7
62 #define Anum_pg_rewrite_rulename                1
63 #define Anum_pg_rewrite_ev_class                2
64 #define Anum_pg_rewrite_ev_attr                 3
65 #define Anum_pg_rewrite_ev_type                 4
66 #define Anum_pg_rewrite_is_instead              5
67 #define Anum_pg_rewrite_ev_qual                 6
68 #define Anum_pg_rewrite_ev_action               7
69
70 #endif   /* PG_REWRITE_H */