# pg_shadow

> For the complete documentation index, see [llms.txt](https://docs.redpanda.com/llms.txt). Component-specific: [cloud-data-platform-full.txt](https://docs.redpanda.com/cloud-data-platform-full.txt)

---
title: pg_shadow
latest-operator-version: v26.1.4
latest-console-tag: v3.7.3
latest-connect-version: 4.93.0
latest-redpanda-tag: v26.1.9
docname: sql/system-catalogs/catalogs/pg_shadow
page-component-name: cloud-data-platform
page-version: master
page-component-version: master
page-component-title: Cloud
page-relative-src-path: sql/system-catalogs/catalogs/pg_shadow.adoc
page-edit-url: https://github.com/redpanda-data/cloud-docs/edit/main/modules/reference/pages/sql/system-catalogs/catalogs/pg_shadow.adoc
description: The pg_shadow system catalog provides a superuser-only view of database users with unmasked passwords.
page-topic-type: reference
page-git-created-date: "2026-05-26"
page-git-modified-date: "2026-05-26"
---

<!-- Source: https://docs.redpanda.com/cloud-data-platform/reference/sql/system-catalogs/catalogs/pg_shadow.md -->

The `pg_shadow` system catalog provides a superuser-only view of database users with unmasked passwords. It mimics the [pg\_shadow](https://www.postgresql.org/docs/current/view-pg-shadow.html) PostgreSQL system view.

> 📝 **NOTE**
>
> This table is only accessible to superusers. For a publicly readable view, use [pg\_user](https://docs.redpanda.com/cloud-data-platform/reference/sql/system-catalogs/catalogs/pg_user/) or [pg\_roles](https://docs.redpanda.com/cloud-data-platform/reference/sql/system-catalogs/catalogs/pg_roles/).

## [](#columns)Columns

The following columns are available for querying in `pg_shadow`:

| Column | Type | Description |
| --- | --- | --- |
| usename | text | User name |
| usesysid | bigint | User system ID (role OID) |
| usecreatedb | bool | Whether the user can create databases |
| usesuper | bool | Whether the user has superuser privileges |
| userepl | bool | Whether the user has replication privileges |
| usebypassrls | bool | Whether the user bypasses row-level security policies |
| passwd | text | Encrypted password (visible to superusers) |
| valuntil | timestamptz | Password expiration time (NULL if no expiration) |
| useconfig | text | Session defaults for this user |

## [](#examples)Examples

```sql
SELECT usename, usesuper FROM pg_shadow;
```