Header And Logo

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

pg_rewrite.h

Go to the documentation of this file.
00001 /*-------------------------------------------------------------------------
00002  *
00003  * pg_rewrite.h
00004  *    definition of the system "rewrite-rule" relation (pg_rewrite)
00005  *    along with the relation's initial contents.
00006  *
00007  * As of Postgres 7.3, the primary key for this table is <ev_class, rulename>
00008  * --- ie, rule names are only unique among the rules of a given table.
00009  *
00010  *
00011  * Portions Copyright (c) 1996-2013, PostgreSQL Global Development Group
00012  * Portions Copyright (c) 1994, Regents of the University of California
00013  *
00014  * src/include/catalog/pg_rewrite.h
00015  *
00016  * NOTES
00017  *    the genbki.pl script reads this file and generates .bki
00018  *    information from the DATA() statements.
00019  *
00020  *-------------------------------------------------------------------------
00021  */
00022 #ifndef PG_REWRITE_H
00023 #define PG_REWRITE_H
00024 
00025 #include "catalog/genbki.h"
00026 
00027 /* ----------------
00028  *      pg_rewrite definition.  cpp turns this into
00029  *      typedef struct FormData_pg_rewrite
00030  * ----------------
00031  */
00032 #define RewriteRelationId  2618
00033 
00034 CATALOG(pg_rewrite,2618)
00035 {
00036     NameData    rulename;
00037     Oid         ev_class;
00038     int16       ev_attr;
00039     char        ev_type;
00040     char        ev_enabled;
00041     bool        is_instead;
00042 
00043 #ifdef CATALOG_VARLEN           /* variable-length fields start here */
00044     pg_node_tree ev_qual;
00045     pg_node_tree ev_action;
00046 #endif
00047 } FormData_pg_rewrite;
00048 
00049 /* ----------------
00050  *      Form_pg_rewrite corresponds to a pointer to a tuple with
00051  *      the format of pg_rewrite relation.
00052  * ----------------
00053  */
00054 typedef FormData_pg_rewrite *Form_pg_rewrite;
00055 
00056 /* ----------------
00057  *      compiler constants for pg_rewrite
00058  * ----------------
00059  */
00060 #define Natts_pg_rewrite                8
00061 #define Anum_pg_rewrite_rulename        1
00062 #define Anum_pg_rewrite_ev_class        2
00063 #define Anum_pg_rewrite_ev_attr         3
00064 #define Anum_pg_rewrite_ev_type         4
00065 #define Anum_pg_rewrite_ev_enabled      5
00066 #define Anum_pg_rewrite_is_instead      6
00067 #define Anum_pg_rewrite_ev_qual         7
00068 #define Anum_pg_rewrite_ev_action       8
00069 
00070 #endif   /* PG_REWRITE_H */