{"Entry":{"collection":"catalog","key":"pg_roles","name":"pg_roles","aliases":[],"metadata":{"changed_in":["9.1","9.5"],"changes":[{"added":[],"attributes":[],"description_changed":false,"descriptions":[],"from":"8.0","order":false,"removed":[],"status":"added","to":"8.1","types":[]},{"added":[],"attributes":[],"description_changed":false,"descriptions":[{"from":"Role may log in, that is, this role can be given as the initial session authorization identifier.","name":"rolcanlogin","to":"Role may log in. That is, this role can be given as the initial session authorization identifier"},{"from":"For roles that can log in, this sets maximum number of concurrent connections this role can make. -1 means no limit.","name":"rolconnlimit","to":"For roles that can log in, this sets maximum number of concurrent connections this role can make. -1 means no limit"}],"from":"8.1","listing":[],"order":false,"removed":[],"status":"reworded","to":"8.2","types":[],"unlisted":[]},{"added":[],"attributes":[],"description_changed":false,"descriptions":[{"from":"Role may log in. That is, this role can be given as the initial session authorization identifier","name":"rolcanlogin","to":"Role can log in. That is, this role can be given as the initial session authorization identifier"},{"from":"Role may update system catalogs directly. (Even a superuser may not do this unless this column is true.)","name":"rolcatupdate","to":"Role can update system catalogs directly. (Even a superuser cannot do this unless this column is true.)"},{"from":"Role may create databases","name":"rolcreatedb","to":"Role can create databases"},{"from":"Role may create more roles","name":"rolcreaterole","to":"Role can create more roles"}],"from":"8.2","listing":[],"order":false,"removed":[],"status":"reworded","to":"8.3","types":[],"unlisted":[]},{"added":[],"attributes":[],"description_changed":false,"descriptions":[{"from":"Role can update system catalogs directly. (Even a superuser cannot do this unless this column is true.)","name":"rolcatupdate","to":"Role can update system catalogs directly. (Even a superuser cannot do this unless this column is true)"},{"from":"Session defaults for run-time configuration variables","name":"rolconfig","to":"Role-specific defaults for run-time configuration variables"},{"from":"For roles that can log in, this sets maximum number of concurrent connections this role can make. -1 means no limit","name":"rolconnlimit","to":"For roles that can log in, this sets maximum number of concurrent connections this role can make. -1 means no limit."},{"from":"Password expiry time (only used for password authentication); NULL if no expiration","name":"rolvaliduntil","to":"Password expiry time (only used for password authentication); null if no expiration"}],"from":"8.4","listing":[],"order":false,"removed":[],"status":"reworded","to":"9.0","types":[],"unlisted":[]},{"added":["rolreplication"],"attributes":[],"description_changed":false,"descriptions":[],"from":"9.0","listing":[],"order":false,"removed":[],"status":"changed","to":"9.1","types":[],"unlisted":[]},{"added":["rolbypassrls"],"attributes":[],"description_changed":false,"descriptions":[],"from":"9.4","listing":[],"order":false,"removed":["rolcatupdate"],"status":"changed","to":"9.5","types":[],"unlisted":[]},{"added":[],"attributes":[],"description_changed":false,"descriptions":[{"from":"Role is a replication role. That is, this role can initiate streaming replication (see Section 25.2.5) and set/unset the system backup mode using pg_start_backup and pg_stop_backup","name":"rolreplication","to":"Role is a replication role. A replication role can initiate replication connections and create and drop replication slots."}],"from":"9.5","listing":[],"order":false,"removed":[],"status":"reworded","to":"9.6","types":[],"unlisted":[]},{"added":[],"attributes":[],"description_changed":true,"descriptions":[{"from":"Role bypasses every row level security policy, see Section 5.7 for more information.","name":"rolbypassrls","to":"Role bypasses every row level security policy, see Section 5.8 for more information."}],"from":"11","listing":[],"order":false,"removed":[],"status":"reworded","to":"12","types":[],"unlisted":[]},{"added":[],"attributes":[],"description_changed":false,"descriptions":[{"from":"Role bypasses every row level security policy, see Section 5.8 for more information.","name":"rolbypassrls","to":"Role bypasses every row-level security policy, see Section 5.8 for more information."}],"from":"13","listing":[],"order":false,"removed":[],"status":"reworded","to":"14","types":[],"unlisted":[]},{"added":[],"attributes":[],"description_changed":false,"descriptions":[{"from":"Role bypasses every row-level security policy, see Section 5.8 for more information.","name":"rolbypassrls","to":"Role bypasses every row-level security policy, see Section 5.9 for more information."}],"from":"16","listing":[],"order":false,"removed":[],"status":"reworded","to":"17","types":[],"unlisted":[]},{"added":[],"attributes":[],"description_changed":false,"descriptions":[{"from":"Role bypasses every row-level security policy, see Section 5.9 for more information.","name":"rolbypassrls","to":"Role bypasses every row-level security policy, see Section 5.10 for more information."}],"from":"18","listing":[],"order":false,"removed":[],"status":"reworded","to":"19","types":[],"unlisted":[]}],"column_count":13,"content_hash":"0b0a6fc1c0ab437e723cab53c49187767e8911f05bea0a6d33094a85e26af69f","first_version":"8.1","imported_at":"2026-09-30T00:40:55.772381+08:00","kind":"view","last_version":"20","name":"pg_roles","position":68,"present_in":["8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"relation_oid":null,"relkind":"v","shared":false,"source_rev":"english-manuals:77717f087b36247c1a889f0b3de4d0af19ca0973b95accbafeda69f7c9d6347e","summary":"The view pg_roles provides access to information about database roles.","summary_zh":""}},"Definition":{"Collection":"catalog","Key":"pg_roles","SourceDatabase":"center","Version":"18","SourceTable":"catalog","SourceKey":"pg_roles","SourceRevision":"english-manuals:77717f087b36247c1a889f0b3de4d0af19ca0973b95accbafeda69f7c9d6347e","Facts":{"columns":[{"array_dimensions":0,"attnum":1,"description":"Role name","description_zh":"","documented":true,"documented_name":"rolname","hidden":false,"name":"rolname","not_null":false,"references":"","type":"name","type_modifier":-1,"type_oid":19},{"array_dimensions":0,"attnum":2,"description":"Role has superuser privileges","description_zh":"","documented":true,"documented_name":"rolsuper","hidden":false,"name":"rolsuper","not_null":false,"references":"","type":"bool","type_modifier":-1,"type_oid":16},{"array_dimensions":0,"attnum":3,"description":"Role automatically inherits privileges of roles it is a member of","description_zh":"","documented":true,"documented_name":"rolinherit","hidden":false,"name":"rolinherit","not_null":false,"references":"","type":"bool","type_modifier":-1,"type_oid":16},{"array_dimensions":0,"attnum":4,"description":"Role can create more roles","description_zh":"","documented":true,"documented_name":"rolcreaterole","hidden":false,"name":"rolcreaterole","not_null":false,"references":"","type":"bool","type_modifier":-1,"type_oid":16},{"array_dimensions":0,"attnum":5,"description":"Role can create databases","description_zh":"","documented":true,"documented_name":"rolcreatedb","hidden":false,"name":"rolcreatedb","not_null":false,"references":"","type":"bool","type_modifier":-1,"type_oid":16},{"array_dimensions":0,"attnum":6,"description":"Role can log in. That is, this role can be given as the initial session authorization identifier","description_zh":"","documented":true,"documented_name":"rolcanlogin","hidden":false,"name":"rolcanlogin","not_null":false,"references":"","type":"bool","type_modifier":-1,"type_oid":16},{"array_dimensions":0,"attnum":7,"description":"Role is a replication role. A replication role can initiate replication connections and create and drop replication slots.","description_zh":"","documented":true,"documented_name":"rolreplication","hidden":false,"name":"rolreplication","not_null":false,"references":"","type":"bool","type_modifier":-1,"type_oid":16},{"array_dimensions":0,"attnum":8,"description":"For roles that can log in, this sets maximum number of concurrent connections this role can make. -1 means no limit.","description_zh":"","documented":true,"documented_name":"rolconnlimit","hidden":false,"name":"rolconnlimit","not_null":false,"references":"","type":"int4","type_modifier":-1,"type_oid":23},{"array_dimensions":0,"attnum":9,"description":"Not the password (always reads as ********)","description_zh":"","documented":true,"documented_name":"rolpassword","hidden":false,"name":"rolpassword","not_null":false,"references":"","type":"text","type_modifier":-1,"type_oid":25},{"array_dimensions":0,"attnum":10,"description":"Password expiry time (only used for password authentication); null if no expiration","description_zh":"","documented":true,"documented_name":"rolvaliduntil","hidden":false,"name":"rolvaliduntil","not_null":false,"references":"","type":"timestamptz","type_modifier":-1,"type_oid":1184},{"array_dimensions":0,"attnum":11,"description":"Role bypasses every row-level security policy, see Section 5.9 for more information.","description_zh":"","documented":true,"documented_name":"rolbypassrls","hidden":false,"name":"rolbypassrls","not_null":false,"references":"","type":"bool","type_modifier":-1,"type_oid":16},{"array_dimensions":0,"attnum":12,"description":"Role-specific defaults for run-time configuration variables","description_zh":"","documented":true,"documented_name":"rolconfig","hidden":false,"name":"rolconfig","not_null":false,"references":"","type":"text[]","type_modifier":-1,"type_oid":1009},{"array_dimensions":0,"attnum":13,"description":"ID of role","description_zh":"","documented":true,"documented_name":"oid","hidden":false,"name":"oid","not_null":false,"references":"pg_authid.oid","type":"oid","type_modifier":-1,"type_oid":26}],"description":"The view pg_roles provides access to information about database roles. This is simply a publicly readable view of pg_authid that blanks out the password field.","description_zh":"","doc":{"anchor":"id-1.10.5.25.4","file":"view-pg-roles.html","lang":"en","sha256":"e55c101cf58ad5839bc595f8b6f7264b85e01be9bf0855d99748e79677c91ce9","slug":"18"},"kind":"view","lang":"en","measured_attributes":true,"metadata_release":"18.6","runtime_columns":["rolname","rolsuper","rolinherit","rolcreaterole","rolcreatedb","rolcanlogin","rolreplication","rolconnlimit","rolpassword","rolvaliduntil","rolbypassrls","rolconfig","oid"],"runtime_verified":false,"source":"english-manual"},"ManualEvidence":{"doc":{"anchor":"id-1.10.5.25.4","file":"view-pg-roles.html","lang":"en","sha256":"e55c101cf58ad5839bc595f8b6f7264b85e01be9bf0855d99748e79677c91ce9","slug":"18"}},"MeasuredEvidence":{"measured_attributes":true,"metadata_release":"18.6","runtime_columns":["rolname","rolsuper","rolinherit","rolcreaterole","rolcreatedb","rolcanlogin","rolreplication","rolconnlimit","rolpassword","rolvaliduntil","rolbypassrls","rolconfig","oid"],"runtime_verified":false}},"Text":{"Collection":"catalog","Key":"pg_roles","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"pg_roles","Summary":"视图pg_roles提供数据库角色的信息。它本质上是 pg_authid 的公开可读视图，并隐藏密码字段。","BodyHTML":"\u003cp\u003e视图pg_roles提供数据库角色的信息。它本质上是 pg_authid 的公开可读视图，并隐藏密码字段。\u003c/p\u003e","SourceRevision":"2026-09-27@419045e","ContentHash":"1b7937499a5000a70766b1bbb69bf8817ef81caaf4d40ecd52d340e10f30f77c","Payload":{"columns":[{"description_zh":"角色名","name":"rolname","type":"name","zh_from":"doc"},{"description_zh":"角色有超级用户权限","name":"rolsuper","type":"boolean","zh_from":"doc"},{"description_zh":"该角色是否会自动继承其所属角色的权限","name":"rolinherit","type":"boolean","zh_from":"doc"},{"description_zh":"角色能创建更多角色","name":"rolcreaterole","type":"boolean","zh_from":"doc"},{"description_zh":"角色能创建数据库","name":"rolcreatedb","type":"boolean","zh_from":"doc"},{"description_zh":"角色是否可登录。也就是说，该角色能否被用作初始会话授权标识符","name":"rolcanlogin","type":"boolean","zh_from":"doc"},{"description_zh":"角色是一个复制角色。复制角色可以启动复制连接并且创建和删除复制槽。","name":"rolreplication","type":"boolean","zh_from":"doc"},{"description_zh":"对于可以登录的角色，本列设置该角色能够建立的最大并发连接数。-1 表示无限制。","name":"rolconnlimit","type":"integer","zh_from":"doc"},{"description_zh":"不是密码（始终显示为 ********）","name":"rolpassword","type":"text","zh_from":"doc"},{"description_zh":"密码过期时间（仅用于密码认证）；不设过期时间时为 NULL","name":"rolvaliduntil","type":"timestamp with time zone","zh_from":"doc"},{"description_zh":"角色是否可以绕过所有的行级安全策略，详见第 5.9 节。","name":"rolbypassrls","type":"boolean","zh_from":"doc"},{"description_zh":"运行时配置变量的角色特定默认值","name":"rolconfig","type":"text[]","zh_from":"doc"},{"description_zh":"角色的ID","name":"oid","type":"oid","zh_from":"doc"}],"description_zh":"视图pg_roles提供数据库角色的信息。它本质上是 pg_authid 的公开可读视图，并隐藏密码字段。","zh_from":"doc"}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
