pg_amcheck: Fix test failure on Windows with non-existing role
[pgsql.git] / src / include / catalog / pg_db_role_setting.h
blobbe5cde022862c261656f1dfa894d58b76e05c77f
1 /*-------------------------------------------------------------------------
3 * pg_db_role_setting.h
4 * definition of the system catalog for per-database/per-user
5 * configuration settings (pg_db_role_setting)
8 * Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
9 * Portions Copyright (c) 1994, Regents of the University of California
11 * src/include/catalog/pg_db_role_setting.h
13 * NOTES
14 * The Catalog.pm module reads this file and derives schema
15 * information.
17 *-------------------------------------------------------------------------
19 #ifndef PG_DB_ROLE_SETTING_H
20 #define PG_DB_ROLE_SETTING_H
22 #include "catalog/genbki.h"
23 #include "catalog/pg_db_role_setting_d.h" /* IWYU pragma: export */
25 #include "utils/guc.h"
26 #include "utils/relcache.h"
27 #include "utils/snapshot.h"
29 /* ----------------
30 * pg_db_role_setting definition. cpp turns this into
31 * typedef struct FormData_pg_db_role_setting
32 * ----------------
34 CATALOG(pg_db_role_setting,2964,DbRoleSettingRelationId) BKI_SHARED_RELATION
36 /* database, or 0 for a role-specific setting */
37 Oid setdatabase BKI_LOOKUP_OPT(pg_database);
39 /* role, or 0 for a database-specific setting */
40 Oid setrole BKI_LOOKUP_OPT(pg_authid);
42 #ifdef CATALOG_VARLEN /* variable-length fields start here */
43 text setconfig[1]; /* GUC settings to apply at login */
44 #endif
45 } FormData_pg_db_role_setting;
47 typedef FormData_pg_db_role_setting * Form_pg_db_role_setting;
49 DECLARE_TOAST_WITH_MACRO(pg_db_role_setting, 2966, 2967, PgDbRoleSettingToastTable, PgDbRoleSettingToastIndex);
51 DECLARE_UNIQUE_INDEX_PKEY(pg_db_role_setting_databaseid_rol_index, 2965, DbRoleSettingDatidRolidIndexId, pg_db_role_setting, btree(setdatabase oid_ops, setrole oid_ops));
54 * prototypes for functions in pg_db_role_setting.c
56 extern void AlterSetting(Oid databaseid, Oid roleid, VariableSetStmt *setstmt);
57 extern void DropSetting(Oid databaseid, Oid roleid);
58 extern void ApplySetting(Snapshot snapshot, Oid databaseid, Oid roleid,
59 Relation relsetting, GucSource source);
61 #endif /* PG_DB_ROLE_SETTING_H */