PostgreSQL Source Code  git master
pg_db_role_setting.h
Go to the documentation of this file.
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-2021, 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  /* database, or 0 for a role-specific setting */
37  Oid setdatabase BKI_LOOKUP_OPT(pg_database);
38 
39  /* role, or 0 for a database-specific setting */
40  Oid setrole BKI_LOOKUP_OPT(pg_authid);
41 
42 #ifdef CATALOG_VARLEN /* variable-length fields start here */
43  text setconfig[1]; /* GUC settings to apply at login */
44 #endif
46 
48 
49 DECLARE_TOAST(pg_db_role_setting, 2966, 2967);
50 #define PgDbRoleSettingToastTable 2966
51 #define PgDbRoleSettingToastIndex 2967
52 
53 DECLARE_UNIQUE_INDEX_PKEY(pg_db_role_setting_databaseid_rol_index, 2965, on pg_db_role_setting using btree(setdatabase oid_ops, setrole oid_ops));
54 #define DbRoleSettingDatidRolidIndexId 2965
55 
56 /*
57  * prototypes for functions in pg_db_role_setting.h
58  */
59 extern void AlterSetting(Oid databaseid, Oid roleid, VariableSetStmt *setstmt);
60 extern void DropSetting(Oid databaseid, Oid roleid);
61 extern void ApplySetting(Snapshot snapshot, Oid databaseid, Oid roleid,
62  Relation relsetting, GucSource source);
63 
64 #endif /* PG_DB_ROLE_SETTING_H */
DECLARE_TOAST(pg_db_role_setting, 2966, 2967)
#define BKI_SHARED_RELATION
Definition: genbki.h:27
unsigned int Oid
Definition: postgres_ext.h:31
GucSource
Definition: guc.h:104
DECLARE_UNIQUE_INDEX_PKEY(pg_db_role_setting_databaseid_rol_index, 2965, on pg_db_role_setting using btree(setdatabase oid_ops, setrole oid_ops))
void DropSetting(Oid databaseid, Oid roleid)
void AlterSetting(Oid databaseid, Oid roleid, VariableSetStmt *setstmt)
CATALOG(pg_db_role_setting, 2964, DbRoleSettingRelationId) BKI_SHARED_RELATION
#define BKI_LOOKUP_OPT(catalog)
Definition: genbki.h:47
void ApplySetting(Snapshot snapshot, Oid databaseid, Oid roleid, Relation relsetting, GucSource source)
static rewind_source * source
Definition: pg_rewind.c:79
Definition: c.h:621
FormData_pg_db_role_setting
FormData_pg_db_role_setting * Form_pg_db_role_setting