1 /*-------------------------------------------------------------------------
7 * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
12 *-------------------------------------------------------------------------
14 #ifndef REWRITEDEFINE_H
15 #define REWRITEDEFINE_H
17 #include "nodes/parsenodes.h"
18 #include "utils/relcache.h"
20 #define RULE_FIRES_ON_ORIGIN 'O'
21 #define RULE_FIRES_ALWAYS 'A'
22 #define RULE_FIRES_ON_REPLICA 'R'
23 #define RULE_DISABLED 'D'
25 extern void DefineRule(RuleStmt
*stmt
, const char *queryString
);
27 extern void DefineQueryRewrite(char *rulename
,
35 extern void RenameRewriteRule(Oid owningRel
, const char *oldName
,
38 extern void setRuleCheckAsUser(Node
*node
, Oid userid
);
40 extern void EnableDisableRule(Relation rel
, const char *rulename
,
43 #endif /* REWRITEDEFINE_H */