1996-07-09 08:22:35 +02: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
|
|
|
*
|
|
|
|
* Copyright (c) 1994, Regents of the University of California
|
|
|
|
*
|
1997-09-07 07:04:48 +02:00
|
|
|
* $Id: prs2lock.h,v 1.5 1997/09/07 05:00:32 momjian Exp $
|
1996-07-09 08:22:35 +02:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
#ifndef PRS2LOCK_H
|
|
|
|
#define PRS2LOCK_H
|
|
|
|
|
1996-11-04 08:46:06 +01:00
|
|
|
#include <access/attnum.h>
|
|
|
|
#include <nodes/pg_list.h>
|
1996-07-09 08:22:35 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* RewriteRule -
|
1997-09-07 07:04:48 +02:00
|
|
|
* holds a info for a rewrite rule
|
1996-07-09 08:22:35 +02:00
|
|
|
*
|
|
|
|
*/
|
1997-09-07 07:04:48 +02:00
|
|
|
typedef struct RewriteRule
|
|
|
|
{
|
|
|
|
Oid ruleId;
|
|
|
|
CmdType event;
|
|
|
|
AttrNumber attrno;
|
|
|
|
Node *qual;
|
|
|
|
List *actions;
|
|
|
|
bool isInstead;
|
|
|
|
} 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
|
|
|
|
{
|
|
|
|
int numLocks;
|
|
|
|
RewriteRule **rules;
|
|
|
|
} RuleLock;
|
1996-07-09 08:22:35 +02:00
|
|
|
|
1997-09-07 07:04:48 +02:00
|
|
|
#endif /* REWRITE_H */
|