00001 /*------------------------------------------------------------------------- 00002 * 00003 * pg_default_acl.h 00004 * definition of default ACLs for new objects. 00005 * 00006 * 00007 * Portions Copyright (c) 1996-2013, PostgreSQL Global Development Group 00008 * Portions Copyright (c) 1994, Regents of the University of California 00009 * 00010 * src/include/catalog/pg_default_acl.h 00011 * 00012 * NOTES 00013 * the genbki.pl script reads this file and generates .bki 00014 * information from the DATA() statements. 00015 * 00016 *------------------------------------------------------------------------- 00017 */ 00018 #ifndef PG_DEFAULT_ACL_H 00019 #define PG_DEFAULT_ACL_H 00020 00021 #include "catalog/genbki.h" 00022 00023 /* ---------------- 00024 * pg_default_acl definition. cpp turns this into 00025 * typedef struct FormData_pg_default_acl 00026 * ---------------- 00027 */ 00028 #define DefaultAclRelationId 826 00029 00030 CATALOG(pg_default_acl,826) 00031 { 00032 Oid defaclrole; /* OID of role owning this ACL */ 00033 Oid defaclnamespace; /* OID of namespace, or 0 for all */ 00034 char defaclobjtype; /* see DEFACLOBJ_xxx constants below */ 00035 00036 #ifdef CATALOG_VARLEN /* variable-length fields start here */ 00037 aclitem defaclacl[1]; /* permissions to add at CREATE time */ 00038 #endif 00039 } FormData_pg_default_acl; 00040 00041 /* ---------------- 00042 * Form_pg_default_acl corresponds to a pointer to a tuple with 00043 * the format of pg_default_acl relation. 00044 * ---------------- 00045 */ 00046 typedef FormData_pg_default_acl *Form_pg_default_acl; 00047 00048 /* ---------------- 00049 * compiler constants for pg_default_acl 00050 * ---------------- 00051 */ 00052 00053 #define Natts_pg_default_acl 4 00054 #define Anum_pg_default_acl_defaclrole 1 00055 #define Anum_pg_default_acl_defaclnamespace 2 00056 #define Anum_pg_default_acl_defaclobjtype 3 00057 #define Anum_pg_default_acl_defaclacl 4 00058 00059 /* ---------------- 00060 * pg_default_acl has no initial contents 00061 * ---------------- 00062 */ 00063 00064 /* 00065 * Types of objects for which the user is allowed to specify default 00066 * permissions through pg_default_acl. These codes are used in the 00067 * defaclobjtype column. 00068 */ 00069 #define DEFACLOBJ_RELATION 'r' /* table, view */ 00070 #define DEFACLOBJ_SEQUENCE 'S' /* sequence */ 00071 #define DEFACLOBJ_FUNCTION 'f' /* function */ 00072 #define DEFACLOBJ_TYPE 'T' /* type */ 00073 00074 #endif /* PG_DEFAULT_ACL_H */