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
|
|
|
*
|
2009-01-01 18:24:05 +01:00
|
|
|
* Portions Copyright (c) 1996-2009, 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
|
|
|
*
|
2009-01-22 18:27:55 +01:00
|
|
|
* $PostgreSQL: pgsql/src/include/catalog/pg_rewrite.h,v 1.32 2009/01/22 17:27:54 petere Exp $
|
1996-08-28 03:59:28 +02:00
|
|
|
*
|
|
|
|
* NOTES
|
1997-09-07 07:04:48 +02:00
|
|
|
* the genbki.sh script reads this file and generates .bki
|
|
|
|
* 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;
|
2001-03-22 05:01:46 +01:00
|
|
|
|
2009-01-22 18:27:55 +01:00
|
|
|
/*
|
|
|
|
* is_auto: True if the rule was automatically generated (update
|
|
|
|
* rules). This is tracked separately from the dependency system,
|
|
|
|
* because we want to allow overwriting the automatic update
|
|
|
|
* rules. So both automatically and manually generated rules have
|
|
|
|
* dependency type AUTO.
|
|
|
|
*/
|
|
|
|
bool is_auto;
|
|
|
|
|
2000-07-31 00:14:09 +02:00
|
|
|
/* NB: remaining fields must be accessed via heap_getattr */
|
|
|
|
text ev_qual;
|
|
|
|
text ev_action;
|
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-22 18:27:55 +01:00
|
|
|
#define Natts_pg_rewrite 9
|
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-22 18:27:55 +01:00
|
|
|
#define Anum_pg_rewrite_is_auto 7
|
|
|
|
#define Anum_pg_rewrite_ev_qual 8
|
|
|
|
#define Anum_pg_rewrite_ev_action 9
|
2001-10-28 07:26:15 +01:00
|
|
|
|
2001-11-05 18:46:40 +01:00
|
|
|
#endif /* PG_REWRITE_H */
|