PostgreSQL Source Code  git master
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-2021, 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"
24 
25 /* ----------------
26  * pg_default_acl definition. cpp turns this into
27  * typedef struct FormData_pg_default_acl
28  * ----------------
29  */
30 CATALOG(pg_default_acl,826,DefaultAclRelationId)
31 {
32  Oid oid; /* oid */
33  Oid defaclrole BKI_LOOKUP(pg_authid); /* OID of role owning this
34  * ACL */
35  Oid defaclnamespace BKI_LOOKUP_OPT(pg_namespace); /* OID of namespace, or
36  * 0 for all */
37  char defaclobjtype; /* see DEFACLOBJ_xxx constants below */
38 
39 #ifdef CATALOG_VARLEN /* variable-length fields start here */
40  aclitem defaclacl[1] BKI_FORCE_NOT_NULL; /* permissions to add at
41  * CREATE time */
42 #endif
44 
45 /* ----------------
46  * Form_pg_default_acl corresponds to a pointer to a tuple with
47  * the format of pg_default_acl relation.
48  * ----------------
49  */
51 
52 DECLARE_TOAST(pg_default_acl, 4143, 4144);
53 
54 DECLARE_UNIQUE_INDEX(pg_default_acl_role_nsp_obj_index, 827, DefaultAclRoleNspObjIndexId, on pg_default_acl using btree(defaclrole oid_ops, defaclnamespace oid_ops, defaclobjtype char_ops));
55 DECLARE_UNIQUE_INDEX_PKEY(pg_default_acl_oid_index, 828, DefaultAclOidIndexId, on pg_default_acl using btree(oid oid_ops));
56 
57 #ifdef EXPOSE_TO_CLIENT_CODE
58 
59 /*
60  * Types of objects for which the user is allowed to specify default
61  * permissions through pg_default_acl. These codes are used in the
62  * defaclobjtype column.
63  */
64 #define DEFACLOBJ_RELATION 'r' /* table, view */
65 #define DEFACLOBJ_SEQUENCE 'S' /* sequence */
66 #define DEFACLOBJ_FUNCTION 'f' /* function */
67 #define DEFACLOBJ_TYPE 'T' /* type */
68 #define DEFACLOBJ_NAMESPACE 'n' /* namespace */
69 
70 #endif /* EXPOSE_TO_CLIENT_CODE */
71 
72 #endif /* PG_DEFAULT_ACL_H */
CATALOG(pg_default_acl, 826, DefaultAclRelationId)
unsigned int Oid
Definition: postgres_ext.h:31
#define BKI_FORCE_NOT_NULL
Definition: genbki.h:33
DECLARE_UNIQUE_INDEX(pg_default_acl_role_nsp_obj_index, 827, DefaultAclRoleNspObjIndexId, on pg_default_acl using btree(defaclrole oid_ops, defaclnamespace oid_ops, defaclobjtype char_ops))
FormData_pg_default_acl * Form_pg_default_acl
#define BKI_LOOKUP_OPT(catalog)
Definition: genbki.h:47
#define BKI_LOOKUP(catalog)
Definition: genbki.h:46
DECLARE_UNIQUE_INDEX_PKEY(pg_default_acl_oid_index, 828, DefaultAclOidIndexId, on pg_default_acl using btree(oid oid_ops))
DECLARE_TOAST(pg_default_acl, 4143, 4144)
FormData_pg_default_acl