1996-07-09 08:22:35 +02:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
*
|
1999-02-14 00:22:53 +01:00
|
|
|
* prs2lock.h
|
1997-09-07 07:04:48 +02:00
|
|
|
* data structures for POSTGRES Rule System II (rewrite rules only)
|
1996-07-09 08:22:35 +02:00
|
|
|
*
|
2017-01-03 19:48:53 +01:00
|
|
|
* Portions Copyright (c) 1996-2017, 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/prs2lock.h
|
1996-07-09 08:22:35 +02:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
#ifndef PRS2LOCK_H
|
|
|
|
#define PRS2LOCK_H
|
|
|
|
|
1999-07-16 01:04:24 +02:00
|
|
|
#include "access/attnum.h"
|
|
|
|
#include "nodes/pg_list.h"
|
1996-07-09 08:22:35 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* RewriteRule -
|
2015-05-20 15:18:11 +02:00
|
|
|
* holds an info for a rewrite rule
|
1996-07-09 08:22:35 +02:00
|
|
|
*
|
|
|
|
*/
|
1997-09-07 07:04:48 +02:00
|
|
|
typedef struct RewriteRule
|
|
|
|
{
|
1997-09-08 04:41:22 +02:00
|
|
|
Oid ruleId;
|
|
|
|
CmdType event;
|
|
|
|
Node *qual;
|
|
|
|
List *actions;
|
2007-03-20 00:38:32 +01:00
|
|
|
char enabled;
|
1997-09-08 04:41:22 +02:00
|
|
|
bool isInstead;
|
1997-09-08 23:56:23 +02:00
|
|
|
} RewriteRule;
|
1996-07-09 08:22:35 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* RuleLock -
|
1997-09-07 07:04:48 +02:00
|
|
|
* all rules that apply to a particular relation. Even though we only
|
|
|
|
* have the rewrite rule system left and these are not really "locks",
|
|
|
|
* the name is kept for historical reasons.
|
1996-07-09 08:22:35 +02:00
|
|
|
*/
|
1997-09-07 07:04:48 +02:00
|
|
|
typedef struct RuleLock
|
|
|
|
{
|
1997-09-08 04:41:22 +02:00
|
|
|
int numLocks;
|
|
|
|
RewriteRule **rules;
|
1997-09-08 23:56:23 +02:00
|
|
|
} RuleLock;
|
2001-10-28 07:26:15 +01:00
|
|
|
|
2001-11-05 18:46:40 +01:00
|
|
|
#endif /* REWRITE_H */
|