]> granicus.if.org Git - postgresql/blob - src/include/catalog/pg_rewrite.h
More cleanups of the include files
[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  *
8  * Copyright (c) 1994, Regents of the University of California
9  *
10  * $Id: pg_rewrite.h,v 1.1 1996/08/28 01:57:11 scrappy Exp $
11  *
12  * NOTES
13  *    the genbki.sh script reads this file and generates .bki
14  *    information from the DATA() statements.
15  *
16  *-------------------------------------------------------------------------
17  */
18 #ifndef PG_REWRITE_H
19 #define PG_REWRITE_H
20
21 /* ----------------
22  *      postgres.h contains the system type definintions and the
23  *      CATALOG(), BOOTSTRAP and DATA() sugar words so this file
24  *      can be read by both genbki.sh and the C compiler.
25  * ----------------
26  */
27 #include "postgres.h"
28
29 /* ----------------
30  *      pg_rewrite definition.  cpp turns this into
31  *      typedef struct FormData_pg_rewrite
32  * ----------------
33  */ 
34 CATALOG(pg_rewrite) {
35     NameData    rulename;
36     char        ev_type;
37     Oid         ev_class;
38     int2        ev_attr;
39     bool        is_instead;
40     text        ev_qual;        /* VARLENA */
41     text        action;         /* VARLENA */
42 } FormData_pg_rewrite;
43
44 /* ----------------
45  *      Form_pg_rewrite corresponds to a pointer to a tuple with
46  *      the format of pg_rewrite relation.
47  * ----------------
48  */
49 typedef FormData_pg_rewrite *Form_pg_rewrite;
50
51 /* ----------------
52  *      compiler constants for pg_rewrite
53  * ----------------
54  */
55 #define Natts_pg_rewrite                7
56 #define Anum_pg_rewrite_rulename        1
57 #define Anum_pg_rewrite_ev_type         2
58 #define Anum_pg_rewrite_ev_class        3
59 #define Anum_pg_rewrite_ev_attr         4
60 #define Anum_pg_rewrite_is_instead      5
61 #define Anum_pg_rewrite_ev_qual         6
62 #define Anum_pg_rewrite_action          7
63
64 #endif /* PG_REWRITE_H */