]> granicus.if.org Git - postgresql/blob - src/include/catalog/pg_rewrite.h
Update copyrights for 2013
[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-2013, PostgreSQL Global Development Group
12  * Portions Copyright (c) 1994, Regents of the University of California
13  *
14  * src/include/catalog/pg_rewrite.h
15  *
16  * NOTES
17  *        the genbki.pl 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 #include "catalog/genbki.h"
26
27 /* ----------------
28  *              pg_rewrite definition.  cpp turns this into
29  *              typedef struct FormData_pg_rewrite
30  * ----------------
31  */
32 #define RewriteRelationId  2618
33
34 CATALOG(pg_rewrite,2618)
35 {
36         NameData        rulename;
37         Oid                     ev_class;
38         int16           ev_attr;
39         char            ev_type;
40         char            ev_enabled;
41         bool            is_instead;
42
43 #ifdef CATALOG_VARLEN                   /* variable-length fields start here */
44         pg_node_tree ev_qual;
45         pg_node_tree ev_action;
46 #endif
47 } FormData_pg_rewrite;
48
49 /* ----------------
50  *              Form_pg_rewrite corresponds to a pointer to a tuple with
51  *              the format of pg_rewrite relation.
52  * ----------------
53  */
54 typedef FormData_pg_rewrite *Form_pg_rewrite;
55
56 /* ----------------
57  *              compiler constants for pg_rewrite
58  * ----------------
59  */
60 #define Natts_pg_rewrite                                8
61 #define Anum_pg_rewrite_rulename                1
62 #define Anum_pg_rewrite_ev_class                2
63 #define Anum_pg_rewrite_ev_attr                 3
64 #define Anum_pg_rewrite_ev_type                 4
65 #define Anum_pg_rewrite_ev_enabled              5
66 #define Anum_pg_rewrite_is_instead              6
67 #define Anum_pg_rewrite_ev_qual                 7
68 #define Anum_pg_rewrite_ev_action               8
69
70 #endif   /* PG_REWRITE_H */