]> granicus.if.org Git - postgresql/blob - src/include/rewrite/prs2lock.h
pgindent run for 8.3.
[postgresql] / src / include / rewrite / prs2lock.h
1 /*-------------------------------------------------------------------------
2  *
3  * prs2lock.h
4  *        data structures for POSTGRES Rule System II (rewrite rules only)
5  *
6  * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
7  * Portions Copyright (c) 1994, Regents of the University of California
8  *
9  * $PostgreSQL: pgsql/src/include/rewrite/prs2lock.h,v 1.23 2007/03/19 23:38:32 wieck Exp $
10  *
11  *-------------------------------------------------------------------------
12  */
13 #ifndef PRS2LOCK_H
14 #define PRS2LOCK_H
15
16 #include "access/attnum.h"
17 #include "nodes/pg_list.h"
18
19 /*
20  * RewriteRule -
21  *        holds a info for a rewrite rule
22  *
23  */
24 typedef struct RewriteRule
25 {
26         Oid                     ruleId;
27         CmdType         event;
28         AttrNumber      attrno;
29         Node       *qual;
30         List       *actions;
31         char            enabled;
32         bool            isInstead;
33 } RewriteRule;
34
35 /*
36  * RuleLock -
37  *        all rules that apply to a particular relation. Even though we only
38  *        have the rewrite rule system left and these are not really "locks",
39  *        the name is kept for historical reasons.
40  */
41 typedef struct RuleLock
42 {
43         int                     numLocks;
44         RewriteRule **rules;
45 } RuleLock;
46
47 #endif   /* REWRITE_H */