PostgreSQL Source Code git master
Loading...
Searching...
No Matches
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-2026, 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" /* IWYU pragma: export */
23
24/* ----------------
25 * pg_policy definition. cpp turns this into
26 * typedef struct FormData_pg_policy
27 * ----------------
28 */
30
32{
33 Oid oid; /* oid */
34 NameData polname; /* Policy name. */
35 Oid polrelid BKI_LOOKUP(pg_class); /* Oid of the relation with
36 * policy. */
37 char polcmd; /* One of ACL_*_CHR, or '*' for all */
38 bool polpermissive; /* restrictive or permissive policy */
39
40#ifdef CATALOG_VARLEN
41 /* Roles to which the policy is applied; zero means PUBLIC */
43 pg_node_tree polqual; /* Policy quals. */
44 pg_node_tree polwithcheck; /* WITH CHECK quals. */
45#endif
47
49
50/* ----------------
51 * Form_pg_policy corresponds to a pointer to a row with
52 * the format of pg_policy relation.
53 * ----------------
54 */
56
58
61
62#endif /* PG_POLICY_H */
#define BEGIN_CATALOG_STRUCT
Definition genbki.h:37
#define DECLARE_UNIQUE_INDEX_PKEY(name, oid, oidmacro, tblname, decl)
Definition genbki.h:105
#define BKI_LOOKUP(catalog)
Definition genbki.h:65
#define END_CATALOG_STRUCT
Definition genbki.h:38
#define BKI_LOOKUP_OPT(catalog)
Definition genbki.h:66
#define DECLARE_UNIQUE_INDEX(name, oid, oidmacro, tblname, decl)
Definition genbki.h:104
#define BKI_FORCE_NOT_NULL
Definition genbki.h:52
#define DECLARE_TOAST(name, toastoid, indexoid)
Definition genbki.h:82
#define CATALOG(name, oid, oidmacro)
Definition genbki.h:42
FormData_pg_policy
Definition pg_policy.h:46
END_CATALOG_STRUCT typedef FormData_pg_policy * Form_pg_policy
Definition pg_policy.h:55
unsigned int Oid
static int fb(int x)
Definition c.h:793