diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 12:15:05 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 12:15:05 +0000 |
commit | 46651ce6fe013220ed397add242004d764fc0153 (patch) | |
tree | 6e5299f990f88e60174a1d3ae6e48eedd2688b2b /src/include/catalog/pg_policy.h | |
parent | Initial commit. (diff) | |
download | postgresql-14-46651ce6fe013220ed397add242004d764fc0153.tar.xz postgresql-14-46651ce6fe013220ed397add242004d764fc0153.zip |
Adding upstream version 14.5.upstream/14.5upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/include/catalog/pg_policy.h')
-rw-r--r-- | src/include/catalog/pg_policy.h | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/src/include/catalog/pg_policy.h b/src/include/catalog/pg_policy.h new file mode 100644 index 0000000..645b8fe --- /dev/null +++ b/src/include/catalog/pg_policy.h @@ -0,0 +1,60 @@ +/*------------------------------------------------------------------------- + * + * pg_policy.h + * definition of the "policy" system catalog (pg_policy) + * + * + * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group + * Portions Copyright (c) 1994, Regents of the University of California + * + * src/include/catalog/pg_policy.h + * + * NOTES + * The Catalog.pm module reads this file and derives schema + * information. + * + *------------------------------------------------------------------------- + */ +#ifndef PG_POLICY_H +#define PG_POLICY_H + +#include "catalog/genbki.h" +#include "catalog/pg_policy_d.h" + +/* ---------------- + * pg_policy definition. cpp turns this into + * typedef struct FormData_pg_policy + * ---------------- + */ +CATALOG(pg_policy,3256,PolicyRelationId) +{ + Oid oid; /* oid */ + NameData polname; /* Policy name. */ + Oid polrelid BKI_LOOKUP(pg_class); /* Oid of the relation with + * policy. */ + char polcmd; /* One of ACL_*_CHR, or '*' for all */ + bool polpermissive; /* restrictive or permissive policy */ + +#ifdef CATALOG_VARLEN + /* Roles to which the policy is applied; zero means PUBLIC */ + Oid polroles[1] BKI_LOOKUP_OPT(pg_authid) BKI_FORCE_NOT_NULL; + pg_node_tree polqual; /* Policy quals. */ + pg_node_tree polwithcheck; /* WITH CHECK quals. */ +#endif +} FormData_pg_policy; + +/* ---------------- + * Form_pg_policy corresponds to a pointer to a row with + * the format of pg_policy relation. + * ---------------- + */ +typedef FormData_pg_policy *Form_pg_policy; + +DECLARE_TOAST(pg_policy, 4167, 4168); + +DECLARE_UNIQUE_INDEX_PKEY(pg_policy_oid_index, 3257, on pg_policy using btree(oid oid_ops)); +#define PolicyOidIndexId 3257 +DECLARE_UNIQUE_INDEX(pg_policy_polrelid_polname_index, 3258, on pg_policy using btree(polrelid oid_ops, polname name_ops)); +#define PolicyPolrelidPolnameIndexId 3258 + +#endif /* PG_POLICY_H */ |