1 /*------------------------------------------------------------------------- 2 * 3 * pg_db_role_setting.h 4 * definition of the system catalog for per-database/per-user 5 * configuration settings (pg_db_role_setting) 6 * 7 * 8 * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group 9 * Portions Copyright (c) 1994, Regents of the University of California 10 * 11 * src/include/catalog/pg_db_role_setting.h 12 * 13 * NOTES 14 * The Catalog.pm module reads this file and derives schema 15 * information. 16 * 17 *------------------------------------------------------------------------- 18 */ 19 #ifndef PG_DB_ROLE_SETTING_H 20 #define PG_DB_ROLE_SETTING_H 21 22 #include "catalog/genbki.h" 23 #include "catalog/pg_db_role_setting_d.h" 24 25 #include "utils/guc.h" 26 #include "utils/relcache.h" 27 #include "utils/snapshot.h" 28 29 /* ---------------- 30 * pg_db_role_setting definition. cpp turns this into 31 * typedef struct FormData_pg_db_role_setting 32 * ---------------- 33 */ 34 CATALOG(pg_db_role_setting,2964,DbRoleSettingRelationId) BKI_SHARED_RELATION 35 { 36 Oid setdatabase; /* database */ 37 Oid setrole; /* role */ 38 39 #ifdef CATALOG_VARLEN /* variable-length fields start here */ 40 text setconfig[1]; /* GUC settings to apply at login */ 41 #endif 42 } FormData_pg_db_role_setting; 43 44 typedef FormData_pg_db_role_setting * Form_pg_db_role_setting; 45 46 /* 47 * prototypes for functions in pg_db_role_setting.h 48 */ 49 extern void AlterSetting(Oid databaseid, Oid roleid, VariableSetStmt *setstmt); 50 extern void DropSetting(Oid databaseid, Oid roleid); 51 extern void ApplySetting(Snapshot snapshot, Oid databaseid, Oid roleid, 52 Relation relsetting, GucSource source); 53 54 #endif /* PG_DB_ROLE_SETTING_H */ 55