> 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/15/internals/54.-system-views/pg_policies.md).

# 54.14. pg\_policies

## 54.14. pg\_policies

The view `pg_policies` provides access to useful information about each row-level security policy in the database.

**Table 54.14. `pg_policies` Columns**

| <p>Column Type</p><p>Description</p>                                                                                                                                                                                         |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><code>schemaname</code> <code>name</code> (references <a href="/15/internals/system-catalogs/pg_namespace.md"><code>pg\_namespace</code></a>.<code>nspname</code>)</p><p>Name of schema containing table policy is on</p> |
| <p><code>tablename</code> <code>name</code> (references <a href="/15/internals/system-catalogs/pg_class.md"><code>pg\_class</code></a>.<code>relname</code>)</p><p>Name of table policy is on</p>                            |
| <p><code>policyname</code> <code>name</code> (references <a href="/15/internals/system-catalogs/pg_policy.md"><code>pg\_policy</code></a>.<code>polname</code>)</p><p>Name of policy</p>                                     |
| <p><code>permissive</code> <code>text</code></p><p>Is the policy permissive or restrictive?</p>                                                                                                                              |
| <p><code>roles</code> <code>name\[]</code></p><p>The roles to which this policy applies</p>                                                                                                                                  |
| <p><code>cmd</code> <code>text</code></p><p>The command type to which the policy is applied</p>                                                                                                                              |
| <p><code>qual</code> <code>text</code></p><p>The expression added to the security barrier qualifications for queries that this policy applies to</p>                                                                         |
| <p><code>with\_check</code> <code>text</code></p><p>The expression added to the WITH CHECK qualifications for queries that attempt to add rows to this table</p>                                                             |

***

原文：[PostgreSQL 15.19 Documentation](/15/internals/54.-system-views/pg_policies.md)（英文原文，待翻譯）


---

# 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/15/internals/54.-system-views/pg_policies.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.
