]> granicus.if.org Git - postgresql/blob - src/include/rewrite/prs2lock.h
Fix some (more) problems with subselects in rules. Rewriter failed to
[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-2000, PostgreSQL, Inc
7  * Portions Copyright (c) 1994, Regents of the University of California
8  *
9  * $Id: prs2lock.h,v 1.11 2000/01/26 05:58:30 momjian 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         bool            isInstead;
32 } RewriteRule;
33
34 /*
35  * RuleLock -
36  *        all rules that apply to a particular relation. Even though we only
37  *        have the rewrite rule system left and these are not really "locks",
38  *        the name is kept for historical reasons.
39  */
40 typedef struct RuleLock
41 {
42         int                     numLocks;
43         RewriteRule **rules;
44 } RuleLock;
45
46 #endif   /* REWRITE_H */