1996-08-28 03:59:28 +02:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
*
|
1999-02-14 00:22:53 +01:00
|
|
|
* pg_rewrite.h
|
1997-09-07 07:04:48 +02:00
|
|
|
* definition of the system "rewrite-rule" relation (pg_rewrite)
|
|
|
|
* along with the relation's initial contents.
|
1996-08-28 03:59:28 +02:00
|
|
|
*
|
2002-04-18 22:01:11 +02:00
|
|
|
* As of Postgres 7.3, the primary key for this table is <ev_class, rulename>
|
|
|
|
* --- ie, rule names are only unique among the rules of a given table.
|
|
|
|
*
|
1996-08-28 03:59:28 +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-08-28 03:59:28 +02:00
|
|
|
*
|
2010-09-20 22:08:53 +02:00
|
|
|
* src/include/catalog/pg_rewrite.h
|
1996-08-28 03:59:28 +02:00
|
|
|
*
|
|
|
|
* NOTES
|
2010-01-05 02:06:57 +01:00
|
|
|
* the genbki.pl script reads this file and generates .bki
|
1997-09-07 07:04:48 +02:00
|
|
|
* information from the DATA() statements.
|
1996-08-28 03:59:28 +02:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
#ifndef PG_REWRITE_H
|
|
|
|
#define PG_REWRITE_H
|
|
|
|
|
2008-03-27 04:57:34 +01:00
|
|
|
#include "catalog/genbki.h"
|
1996-08-28 03:59:28 +02:00
|
|
|
|
|
|
|
/* ----------------
|
1997-09-07 07:04:48 +02:00
|
|
|
* pg_rewrite definition. cpp turns this into
|
|
|
|
* typedef struct FormData_pg_rewrite
|
1996-08-28 03:59:28 +02:00
|
|
|
* ----------------
|
1997-09-07 07:04:48 +02:00
|
|
|
*/
|
2005-04-14 03:38:22 +02:00
|
|
|
#define RewriteRelationId 2618
|
|
|
|
|
|
|
|
CATALOG(pg_rewrite,2618)
|
1997-09-07 07:04:48 +02:00
|
|
|
{
|
1997-09-08 04:41:22 +02:00
|
|
|
NameData rulename;
|
|
|
|
Oid ev_class;
|
|
|
|
int2 ev_attr;
|
2002-04-18 22:01:11 +02:00
|
|
|
char ev_type;
|
2007-03-20 00:38:32 +01:00
|
|
|
char ev_enabled;
|
1997-09-08 04:41:22 +02:00
|
|
|
bool is_instead;
|
2012-06-10 21:20:04 +02:00
|
|
|
|
2012-01-27 19:16:17 +01:00
|
|
|
#ifdef CATALOG_VARLEN /* variable-length fields start here */
|
2010-09-03 03:34:55 +02:00
|
|
|
pg_node_tree ev_qual;
|
|
|
|
pg_node_tree ev_action;
|
2012-01-27 19:16:17 +01:00
|
|
|
#endif
|
1996-08-28 03:59:28 +02:00
|
|
|
} FormData_pg_rewrite;
|
|
|
|
|
|
|
|
/* ----------------
|
1997-09-07 07:04:48 +02:00
|
|
|
* Form_pg_rewrite corresponds to a pointer to a tuple with
|
|
|
|
* the format of pg_rewrite relation.
|
1996-08-28 03:59:28 +02:00
|
|
|
* ----------------
|
|
|
|
*/
|
|
|
|
typedef FormData_pg_rewrite *Form_pg_rewrite;
|
|
|
|
|
|
|
|
/* ----------------
|
1997-09-07 07:04:48 +02:00
|
|
|
* compiler constants for pg_rewrite
|
1996-08-28 03:59:28 +02:00
|
|
|
* ----------------
|
|
|
|
*/
|
2009-01-27 13:40:15 +01:00
|
|
|
#define Natts_pg_rewrite 8
|
1997-09-07 07:04:48 +02:00
|
|
|
#define Anum_pg_rewrite_rulename 1
|
2002-04-18 22:01:11 +02:00
|
|
|
#define Anum_pg_rewrite_ev_class 2
|
|
|
|
#define Anum_pg_rewrite_ev_attr 3
|
|
|
|
#define Anum_pg_rewrite_ev_type 4
|
2007-03-20 00:38:32 +01:00
|
|
|
#define Anum_pg_rewrite_ev_enabled 5
|
|
|
|
#define Anum_pg_rewrite_is_instead 6
|
2009-01-27 13:40:15 +01:00
|
|
|
#define Anum_pg_rewrite_ev_qual 7
|
|
|
|
#define Anum_pg_rewrite_ev_action 8
|
2001-10-28 07:26:15 +01:00
|
|
|
|
2001-11-05 18:46:40 +01:00
|
|
|
#endif /* PG_REWRITE_H */
|