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-2019, 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; /* OID of role owning this ACL */ |
34 | Oid defaclnamespace; /* OID of namespace, or 0 for all */ |
35 | char defaclobjtype; /* see DEFACLOBJ_xxx constants below */ |
36 | |
37 | #ifdef CATALOG_VARLEN /* variable-length fields start here */ |
38 | aclitem defaclacl[1] BKI_FORCE_NOT_NULL; /* permissions to add at |
39 | * CREATE time */ |
40 | #endif |
41 | } FormData_pg_default_acl; |
42 | |
43 | /* ---------------- |
44 | * Form_pg_default_acl corresponds to a pointer to a tuple with |
45 | * the format of pg_default_acl relation. |
46 | * ---------------- |
47 | */ |
48 | typedef FormData_pg_default_acl *Form_pg_default_acl; |
49 | |
50 | #ifdef EXPOSE_TO_CLIENT_CODE |
51 | |
52 | /* |
53 | * Types of objects for which the user is allowed to specify default |
54 | * permissions through pg_default_acl. These codes are used in the |
55 | * defaclobjtype column. |
56 | */ |
57 | #define DEFACLOBJ_RELATION 'r' /* table, view */ |
58 | #define DEFACLOBJ_SEQUENCE 'S' /* sequence */ |
59 | #define DEFACLOBJ_FUNCTION 'f' /* function */ |
60 | #define DEFACLOBJ_TYPE 'T' /* type */ |
61 | #define DEFACLOBJ_NAMESPACE 'n' /* namespace */ |
62 | |
63 | #endif /* EXPOSE_TO_CLIENT_CODE */ |
64 | |
65 | #endif /* PG_DEFAULT_ACL_H */ |
66 | |