PostgreSQL Source Code git master
Loading...
Searching...
No Matches
pg_default_acl.h
Go to the documentation of this file.
1/*-------------------------------------------------------------------------
2 *
3 * pg_default_acl.h
4 * definition of the system catalog for default ACLs of new objects
5 * (pg_default_acl)
6 *
7 *
8 * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group
9 * Portions Copyright (c) 1994, Regents of the University of California
10 *
11 * src/include/catalog/pg_default_acl.h
12 *
13 * NOTES
14 * The Catalog.pm module reads this file and derives schema
15 * information.
16 *
17 *-------------------------------------------------------------------------
18 */
19#ifndef PG_DEFAULT_ACL_H
20#define PG_DEFAULT_ACL_H
21
22#include "catalog/genbki.h"
23#include "catalog/pg_default_acl_d.h" /* IWYU pragma: export */
24
25/* ----------------
26 * pg_default_acl definition. cpp turns this into
27 * typedef struct FormData_pg_default_acl
28 * ----------------
29 */
31
33{
34 Oid oid; /* oid */
35 Oid defaclrole BKI_LOOKUP(pg_authid); /* OID of role owning this
36 * ACL */
37 Oid defaclnamespace BKI_LOOKUP_OPT(pg_namespace); /* OID of namespace, or
38 * 0 for all */
39 char defaclobjtype; /* see DEFACLOBJ_xxx constants below */
40
41#ifdef CATALOG_VARLEN /* variable-length fields start here */
42 aclitem defaclacl[1] BKI_FORCE_NOT_NULL; /* permissions to add at
43 * CREATE time */
44#endif
46
48
49/* ----------------
50 * Form_pg_default_acl corresponds to a pointer to a tuple with
51 * the format of pg_default_acl relation.
52 * ----------------
53 */
55
57
60
62
63#ifdef EXPOSE_TO_CLIENT_CODE
64
65/*
66 * Types of objects for which the user is allowed to specify default
67 * permissions through pg_default_acl. These codes are used in the
68 * defaclobjtype column.
69 */
70#define DEFACLOBJ_RELATION 'r' /* table, view */
71#define DEFACLOBJ_SEQUENCE 'S' /* sequence */
72#define DEFACLOBJ_FUNCTION 'f' /* function */
73#define DEFACLOBJ_TYPE 'T' /* type */
74#define DEFACLOBJ_NAMESPACE 'n' /* namespace */
75#define DEFACLOBJ_LARGEOBJECT 'L' /* large object */
76
77#endif /* EXPOSE_TO_CLIENT_CODE */
78
79#endif /* PG_DEFAULT_ACL_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
#define MAKE_SYSCACHE(name, idxname, nbuckets)
Definition genbki.h:146
FormData_pg_default_acl
END_CATALOG_STRUCT typedef FormData_pg_default_acl * Form_pg_default_acl
unsigned int Oid
static int fb(int x)