> For the complete documentation index, see [llms.txt](https://docs.postgresql.tw/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.postgresql.tw/19/internals/views/view-pg-shadow.md). Agents can also search and read this documentation through its [MCP server](https://docs.postgresql.tw/~gitbook/mcp).

# 53.26. pg\_shadow \#

### 53.26. `pg_shadow` [#](#view-pg-shadow) <a href="#view-pg-shadow" id="view-pg-shadow"></a>

檢視表 `pg_shadow` 為了向後相容性而存在：它模擬 PostgreSQL 8.1 版之前存在的一個系統目錄。它顯示 [`pg_authid`](https://docs.postgresql.tw/19/internals/catalogs/catalog-pg-authid.md) 中所有標記為 `rolcanlogin` 之角色的屬性。

這個名稱源自於此資料表因為包含密碼，而不應讓大眾讀取。[`pg_user`](https://docs.postgresql.tw/19/internals/views/view-pg-user.md) 是建立在 `pg_shadow` 之上、公開可讀的檢視表，並將密碼欄位遮蔽為空白。

#### 表 53.26. `pg_shadow` 欄位 [#](#view-pg-shadow-columns) <a href="#view-pg-shadow-columns" id="view-pg-shadow-columns"></a>

| <p>欄位類型</p><p>說明</p>                                                                                                                                                                              |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><code>usename</code> <code>name</code> （參照 <a href="https://docs.postgresql.tw/19/internals/catalogs/catalog-pg-authid.md"><code>pg\_authid</code></a>.<code>rolname</code>）</p><p>使用者名稱</p>   |
| <p><code>usesysid</code> <code>oid</code> （參照 <a href="https://docs.postgresql.tw/19/internals/catalogs/catalog-pg-authid.md"><code>pg\_authid</code></a>.<code>oid</code>）</p><p>此使用者的 ID</p>    |
| <p><code>usecreatedb</code> <code>bool</code></p><p>使用者可以建立資料庫</p>                                                                                                                                |
| <p><code>usesuper</code> <code>bool</code></p><p>使用者是超級使用者</p>                                                                                                                                    |
| <p><code>userepl</code> <code>bool</code></p><p>使用者可以啟動串流複寫，並可讓系統進入及離開備份模式。</p>                                                                                                                   |
| <p><code>usebypassrls</code> <code>bool</code></p><p>使用者會略過所有資料列層級安全性政策，更多資訊請參閱<a href="https://docs.postgresql.tw/19/the-sql-language/ddl/ddl-rowsecurity.md">第 5.9 節</a>。</p>                   |
| <p><code>passwd</code> <code>text</code></p><p>加密後的密碼；若無則為 null。關於加密密碼如何儲存的細節，請參閱<a href="https://docs.postgresql.tw/19/internals/catalogs/catalog-pg-authid.md"><code>pg\_authid</code></a>。</p> |
| <p><code>valuntil</code> <code>timestamptz</code></p><p>密碼到期時間（僅用於密碼認證）</p>                                                                                                                       |
| <p><code>useconfig</code> <code>text\[]</code></p><p>執行期設定變數的工作階段預設值</p>                                                                                                                          |

<br>

***

原文：[PostgreSQL 18.6 Documentation](https://www.postgresql.org/docs/18/view-pg-shadow.html)（原文版本：18.6；核對日期：2026-10-10）


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.postgresql.tw/19/internals/views/view-pg-shadow.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
