1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>53.21. pg_roles</title><link rel="stylesheet" type="text/css" href="stylesheet.css" /><link rev="made" href="pgsql-docs@lists.postgresql.org" /><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot" /><link rel="prev" href="view-pg-replication-slots.html" title="53.20. pg_replication_slots" /><link rel="next" href="view-pg-rules.html" title="53.22. pg_rules" /></head><body id="docContent" class="container-fluid col-10"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="5" align="center">53.21. <code class="structname">pg_roles</code></th></tr><tr><td width="10%" align="left"><a accesskey="p" href="view-pg-replication-slots.html" title="53.20. pg_replication_slots">Prev</a> </td><td width="10%" align="left"><a accesskey="u" href="views.html" title="Chapter 53. System Views">Up</a></td><th width="60%" align="center">Chapter 53. System Views</th><td width="10%" align="right"><a accesskey="h" href="index.html" title="PostgreSQL 18.0 Documentation">Home</a></td><td width="10%" align="right"> <a accesskey="n" href="view-pg-rules.html" title="53.22. pg_rules">Next</a></td></tr></table><hr /></div><div class="sect1" id="VIEW-PG-ROLES"><div class="titlepage"><div><div><h2 class="title" style="clear: both">53.21. <code class="structname">pg_roles</code> <a href="#VIEW-PG-ROLES" class="id_link">#</a></h2></div></div></div><a id="id-1.10.5.25.2" class="indexterm"></a><p>
3 The view <code class="structname">pg_roles</code> provides access to
4 information about database roles. This is simply a publicly
6 <a class="link" href="catalog-pg-authid.html" title="52.8. pg_authid"><code class="structname">pg_authid</code></a>
7 that blanks out the password field.
8 </p><div class="table" id="id-1.10.5.25.4"><p class="title"><strong>Table 53.21. <code class="structname">pg_roles</code> Columns</strong></p><div class="table-contents"><table class="table" summary="pg_roles Columns" border="1"><colgroup><col /></colgroup><thead><tr><th class="catalog_table_entry"><p class="column_definition">
13 </p></th></tr></thead><tbody><tr><td class="catalog_table_entry"><p class="column_definition">
14 <code class="structfield">rolname</code> <code class="type">name</code>
18 </p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">
19 <code class="structfield">rolsuper</code> <code class="type">bool</code>
22 Role has superuser privileges
23 </p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">
24 <code class="structfield">rolinherit</code> <code class="type">bool</code>
27 Role automatically inherits privileges of roles it is a
29 </p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">
30 <code class="structfield">rolcreaterole</code> <code class="type">bool</code>
33 Role can create more roles
34 </p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">
35 <code class="structfield">rolcreatedb</code> <code class="type">bool</code>
38 Role can create databases
39 </p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">
40 <code class="structfield">rolcanlogin</code> <code class="type">bool</code>
43 Role can log in. That is, this role can be given as the initial
44 session authorization identifier
45 </p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">
46 <code class="structfield">rolreplication</code> <code class="type">bool</code>
49 Role is a replication role. A replication role can initiate replication
50 connections and create and drop replication slots.
51 </p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">
52 <code class="structfield">rolconnlimit</code> <code class="type">int4</code>
55 For roles that can log in, this sets maximum number of concurrent
56 connections this role can make. -1 means no limit.
57 </p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">
58 <code class="structfield">rolpassword</code> <code class="type">text</code>
61 Not the password (always reads as <code class="literal">********</code>)
62 </p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">
63 <code class="structfield">rolvaliduntil</code> <code class="type">timestamptz</code>
66 Password expiry time (only used for password authentication);
68 </p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">
69 <code class="structfield">rolbypassrls</code> <code class="type">bool</code>
72 Role bypasses every row-level security policy, see
73 <a class="xref" href="ddl-rowsecurity.html" title="5.9. Row Security Policies">Section 5.9</a> for more information.
74 </p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">
75 <code class="structfield">rolconfig</code> <code class="type">text[]</code>
78 Role-specific defaults for run-time configuration variables
79 </p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">
80 <code class="structfield">oid</code> <code class="type">oid</code>
81 (references <a class="link" href="catalog-pg-authid.html" title="52.8. pg_authid"><code class="structname">pg_authid</code></a>.<code class="structfield">oid</code>)
85 </p></td></tr></tbody></table></div></div><br class="table-break" /></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="view-pg-replication-slots.html" title="53.20. pg_replication_slots">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="views.html" title="Chapter 53. System Views">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="view-pg-rules.html" title="53.22. pg_rules">Next</a></td></tr><tr><td width="40%" align="left" valign="top">53.20. <code class="structname">pg_replication_slots</code> </td><td width="20%" align="center"><a accesskey="h" href="index.html" title="PostgreSQL 18.0 Documentation">Home</a></td><td width="40%" align="right" valign="top"> 53.22. <code class="structname">pg_rules</code></td></tr></table></div></body></html>