1996-07-09 08:22:35 +02:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
*
|
1999-02-14 00:22:53 +01:00
|
|
|
* rewriteDefine.h
|
1997-09-07 07:04:48 +02:00
|
|
|
*
|
1996-07-09 08:22:35 +02:00
|
|
|
*
|
|
|
|
*
|
2012-01-02 00:01:58 +01:00
|
|
|
* Portions Copyright (c) 1996-2012, PostgreSQL Global Development Group
|
2000-01-26 06:58:53 +01:00
|
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
1996-07-09 08:22:35 +02:00
|
|
|
*
|
2010-09-20 22:08:53 +02:00
|
|
|
* src/include/rewrite/rewriteDefine.h
|
1996-07-09 08:22:35 +02:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
1997-09-07 07:04:48 +02:00
|
|
|
#ifndef REWRITEDEFINE_H
|
|
|
|
#define REWRITEDEFINE_H
|
1996-07-09 08:22:35 +02:00
|
|
|
|
1997-11-26 02:14:33 +01:00
|
|
|
#include "nodes/parsenodes.h"
|
2008-06-19 02:46:06 +02:00
|
|
|
#include "utils/relcache.h"
|
1997-11-26 02:14:33 +01:00
|
|
|
|
2007-11-15 22:14:46 +01:00
|
|
|
#define RULE_FIRES_ON_ORIGIN 'O'
|
|
|
|
#define RULE_FIRES_ALWAYS 'A'
|
|
|
|
#define RULE_FIRES_ON_REPLICA 'R'
|
|
|
|
#define RULE_DISABLED 'D'
|
2007-03-20 00:38:32 +01:00
|
|
|
|
2007-03-13 01:33:44 +01:00
|
|
|
extern void DefineRule(RuleStmt *stmt, const char *queryString);
|
|
|
|
|
|
|
|
extern void DefineQueryRewrite(char *rulename,
|
2007-08-27 05:36:08 +02:00
|
|
|
Oid event_relid,
|
2007-03-13 01:33:44 +01:00
|
|
|
Node *event_qual,
|
|
|
|
CmdType event_type,
|
|
|
|
bool is_instead,
|
|
|
|
bool replace,
|
|
|
|
List *action);
|
1996-07-09 08:22:35 +02:00
|
|
|
|
2002-04-18 22:01:11 +02:00
|
|
|
extern void RenameRewriteRule(Oid owningRel, const char *oldName,
|
2002-09-04 22:31:48 +02:00
|
|
|
const char *newName);
|
2001-10-28 07:26:15 +01:00
|
|
|
|
2006-09-05 23:08:36 +02:00
|
|
|
extern void setRuleCheckAsUser(Node *node, Oid userid);
|
|
|
|
|
2007-03-20 00:38:32 +01:00
|
|
|
extern void EnableDisableRule(Relation rel, const char *rulename,
|
|
|
|
char fires_when);
|
|
|
|
|
2001-11-05 18:46:40 +01:00
|
|
|
#endif /* REWRITEDEFINE_H */
|