52.87. pg\_shadow

|     52.87. `pg_shadow`      |                   |                           |                  |                                       |
|:---------------------------:|-------------------|---------------------------|------------------|---------------------------------------|
|[Prev](view-pg-settings.html)|[Up](catalogs.html)|Chapter 52. System Catalogs|[Home](index.html)| [Next](view-pg-shmem-allocations.html)|

---

## 52.87. `pg_shadow`

[]()

 The view `pg_shadow` exists for backwards compatibility: it emulates a catalog that existed in PostgreSQL before version 8.1. It shows properties of all roles that are marked as `rolcanlogin` in [`pg_authid`](catalog-pg-authid.html).

 The name stems from the fact that this table should not be readable by the public since it contains passwords. [`pg_user`](view-pg-user.html) is a publicly readable view on `pg_shadow` that blanks out the password field.

**Table 52.88. `pg_shadow` Columns**

|                                                                 Column Type<br/><br/> Description                                                                 |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|                                 `usename` `name` (references [`pg_authid`](catalog-pg-authid.html).`rolname`)<br/><br/> User name                                 |
|                                `usesysid` `oid` (references [`pg_authid`](catalog-pg-authid.html).`oid`)<br/><br/> ID of this user                                |
|                                                     `usecreatedb` `bool`<br/><br/> User can create databases                                                      |
|                                                          `usesuper` `bool`<br/><br/> User is a superuser                                                          |
|                         `userepl` `bool`<br/><br/> User can initiate streaming replication and put the system in and out of backup mode.                          |
|           `usebypassrls` `bool`<br/><br/> User bypasses every row-level security policy, see [Section 5.8](ddl-rowsecurity.html) for more information.            |
|`passwd` `text`<br/><br/> Password (possibly encrypted); null if none. See [`pg_authid`](catalog-pg-authid.html) for details of how encrypted passwords are stored.|
|                                  `valuntil` `timestamptz`<br/><br/> Password expiry time (only used for password authentication)                                  |
|                                       `useconfig` `text[]`<br/><br/> Session defaults for run-time configuration variables                                        |

---

|[Prev](view-pg-settings.html)|[Up](catalogs.html)| [Next](view-pg-shmem-allocations.html)|
|:----------------------------|:-----------------:|--------------------------------------:|
|    52.86. `pg_settings`     |[Home](index.html) |     52.88. `pg_shmem_allocations`     |

 // \<![CDATA[ \<-- For SVG support if ('WebSocket' in window) { (function() { function refreshCSS() { var sheets = [].slice.call(document.getElementsByTagName("link")); var head = document.getElementsByTagName("head")[0]; for (var i = 0; i \< sheets.length; ++i) { var elem = sheets[i]; head.removeChild(elem); var rel = elem.rel; if (elem.href && typeof rel != "string" || rel.length == 0 || rel.toLowerCase() == "stylesheet") { var url = elem.href.replace(/(&|\\?)\_cacheOverride=\\d+/, ''); elem.href = url + (url.indexOf('?') \>= 0 ? '&' : '?') + '\_cacheOverride=' + (new Date().valueOf()); } head.appendChild(elem); } } var protocol = window.location.protocol === 'http:' ? 'ws://' : 'wss://'; var address = protocol + window.location.host + window.location.pathname + '/ws'; var socket = new WebSocket(address); socket.onmessage = function(msg) { if (msg.data == 'reload') window.location.reload(); else if (msg.data == 'refreshcss') refreshCSS(); }; console.log('Live reload enabled.'); })(); } // ]]\>