Header And Logo

PostgreSQL
| The world's most advanced open source database.

prs2lock.h

Go to the documentation of this file.
00001 /*-------------------------------------------------------------------------
00002  *
00003  * prs2lock.h
00004  *    data structures for POSTGRES Rule System II (rewrite rules only)
00005  *
00006  * Portions Copyright (c) 1996-2013, PostgreSQL Global Development Group
00007  * Portions Copyright (c) 1994, Regents of the University of California
00008  *
00009  * src/include/rewrite/prs2lock.h
00010  *
00011  *-------------------------------------------------------------------------
00012  */
00013 #ifndef PRS2LOCK_H
00014 #define PRS2LOCK_H
00015 
00016 #include "access/attnum.h"
00017 #include "nodes/pg_list.h"
00018 
00019 /*
00020  * RewriteRule -
00021  *    holds a info for a rewrite rule
00022  *
00023  */
00024 typedef struct RewriteRule
00025 {
00026     Oid         ruleId;
00027     CmdType     event;
00028     AttrNumber  attrno;
00029     Node       *qual;
00030     List       *actions;
00031     char        enabled;
00032     bool        isInstead;
00033 } RewriteRule;
00034 
00035 /*
00036  * RuleLock -
00037  *    all rules that apply to a particular relation. Even though we only
00038  *    have the rewrite rule system left and these are not really "locks",
00039  *    the name is kept for historical reasons.
00040  */
00041 typedef struct RuleLock
00042 {
00043     int         numLocks;
00044     RewriteRule **rules;
00045 } RuleLock;
00046 
00047 #endif   /* REWRITE_H */