]> granicus.if.org Git - postgresql/blob - src/include/catalog/pg_default_acl.h
Reorganize our CRC source files again.
[postgresql] / src / include / catalog / pg_default_acl.h
1 /*-------------------------------------------------------------------------
2  *
3  * pg_default_acl.h
4  *        definition of default ACLs for new objects.
5  *
6  *
7  * Portions Copyright (c) 1996-2015, PostgreSQL Global Development Group
8  * Portions Copyright (c) 1994, Regents of the University of California
9  *
10  * src/include/catalog/pg_default_acl.h
11  *
12  * NOTES
13  *        the genbki.pl script reads this file and generates .bki
14  *        information from the DATA() statements.
15  *
16  *-------------------------------------------------------------------------
17  */
18 #ifndef PG_DEFAULT_ACL_H
19 #define PG_DEFAULT_ACL_H
20
21 #include "catalog/genbki.h"
22
23 /* ----------------
24  *              pg_default_acl definition.  cpp turns this into
25  *              typedef struct FormData_pg_default_acl
26  * ----------------
27  */
28 #define DefaultAclRelationId    826
29
30 CATALOG(pg_default_acl,826)
31 {
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 */
35
36 #ifdef CATALOG_VARLEN                   /* variable-length fields start here */
37         aclitem         defaclacl[1];   /* permissions to add at CREATE time */
38 #endif
39 } FormData_pg_default_acl;
40
41 /* ----------------
42  *              Form_pg_default_acl corresponds to a pointer to a tuple with
43  *              the format of pg_default_acl relation.
44  * ----------------
45  */
46 typedef FormData_pg_default_acl *Form_pg_default_acl;
47
48 /* ----------------
49  *              compiler constants for pg_default_acl
50  * ----------------
51  */
52
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
58
59 /* ----------------
60  *              pg_default_acl has no initial contents
61  * ----------------
62  */
63
64 /*
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.
68  */
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 */
73
74 #endif   /* PG_DEFAULT_ACL_H */