PostgreSQL Source Code  git master
pg_policy.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * pg_policy.h
4  * definition of the "policy" system catalog (pg_policy)
5  *
6  *
7  * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
8  * Portions Copyright (c) 1994, Regents of the University of California
9  *
10  * src/include/catalog/pg_policy.h
11  *
12  * NOTES
13  * The Catalog.pm module reads this file and derives schema
14  * information.
15  *
16  *-------------------------------------------------------------------------
17  */
18 #ifndef PG_POLICY_H
19 #define PG_POLICY_H
20 
21 #include "catalog/genbki.h"
22 #include "catalog/pg_policy_d.h"
23 
24 /* ----------------
25  * pg_policy definition. cpp turns this into
26  * typedef struct FormData_pg_policy
27  * ----------------
28  */
29 CATALOG(pg_policy,3256,PolicyRelationId)
30 {
31  NameData polname; /* Policy name. */
32  Oid polrelid; /* Oid of the relation with policy. */
33  char polcmd; /* One of ACL_*_CHR, or '*' for all */
34  bool polpermissive; /* restrictive or permissive policy */
35 
36 #ifdef CATALOG_VARLEN
37  Oid polroles[1]; /* Roles associated with policy, not-NULL */
38  pg_node_tree polqual; /* Policy quals. */
39  pg_node_tree polwithcheck; /* WITH CHECK quals. */
40 #endif
42 
43 /* ----------------
44  * Form_pg_policy corresponds to a pointer to a row with
45  * the format of pg_policy relation.
46  * ----------------
47  */
49 
50 #endif /* PG_POLICY_H */
FormData_pg_policy
Definition: pg_policy.h:41
unsigned int Oid
Definition: postgres_ext.h:31
Definition: c.h:570
FormData_pg_policy * Form_pg_policy
Definition: pg_policy.h:48
CATALOG(pg_policy, 3256, PolicyRelationId)
Definition: pg_policy.h:29