1 /*-------------------------------------------------------------------------
4 * definition of default ACLs for new objects.
7 * Portions Copyright (c) 1996-2015, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
10 * src/include/catalog/pg_default_acl.h
13 * the genbki.pl script reads this file and generates .bki
14 * information from the DATA() statements.
16 *-------------------------------------------------------------------------
18 #ifndef PG_DEFAULT_ACL_H
19 #define PG_DEFAULT_ACL_H
21 #include "catalog/genbki.h"
24 * pg_default_acl definition. cpp turns this into
25 * typedef struct FormData_pg_default_acl
28 #define DefaultAclRelationId 826
30 CATALOG(pg_default_acl,826)
32 Oid defaclrole; /* OID of role owning this ACL */
33 Oid defaclnamespace; /* OID of namespace, or 0 for all */
34 char defaclobjtype; /* see DEFACLOBJ_xxx constants below */
36 #ifdef CATALOG_VARLEN /* variable-length fields start here */
37 aclitem defaclacl[1]; /* permissions to add at CREATE time */
39 } FormData_pg_default_acl;
42 * Form_pg_default_acl corresponds to a pointer to a tuple with
43 * the format of pg_default_acl relation.
46 typedef FormData_pg_default_acl *Form_pg_default_acl;
49 * compiler constants for pg_default_acl
53 #define Natts_pg_default_acl 4
54 #define Anum_pg_default_acl_defaclrole 1
55 #define Anum_pg_default_acl_defaclnamespace 2
56 #define Anum_pg_default_acl_defaclobjtype 3
57 #define Anum_pg_default_acl_defaclacl 4
60 * pg_default_acl has no initial contents
65 * Types of objects for which the user is allowed to specify default
66 * permissions through pg_default_acl. These codes are used in the
67 * defaclobjtype column.
69 #define DEFACLOBJ_RELATION 'r' /* table, view */
70 #define DEFACLOBJ_SEQUENCE 'S' /* sequence */
71 #define DEFACLOBJ_FUNCTION 'f' /* function */
72 #define DEFACLOBJ_TYPE 'T' /* type */
74 #endif /* PG_DEFAULT_ACL_H */