# 51.72. pg\_indexes

檢視表 pg\_indexes 提供資料庫中每一個索引的資訊。

#### **Table 51.73. `pg_indexes` Columns**

| <p>Column Type</p><p>Description</p>                                                                                                                                                                                              |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><code>schemaname</code> <code>name</code> (references <a href="/pages/-LGxzwc6F5wwLntQaxol"><code>pg\_namespace</code></a>.<code>nspname</code>)</p><p>Name of schema containing table and index</p>                           |
| <p><code>tablename</code> <code>name</code> (references <a href="/pages/-LDuRqdhzp_q5tqjsFd0"><code>pg\_class</code></a>.<code>relname</code>)</p><p>Name of table the index is for</p>                                           |
| <p><code>indexname</code> <code>name</code> (references <a href="/pages/-LDuRqdhzp_q5tqjsFd0"><code>pg\_class</code></a>.<code>relname</code>)</p><p>Name of index</p>                                                            |
| <p><code>tablespace</code> <code>name</code> (references <a href="/pages/-LAl4R035b0qbJVWNoNJ"><code>pg\_tablespace</code></a>.<code>spcname</code>)</p><p>Name of tablespace containing index (null if default for database)</p> |
| <p><code>indexdef</code> <code>text</code></p><p>Index definition (a reconstructed <code>CREATE INDEX</code> command)</p>                                                                                                         |


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.postgresql.tw/internals/system-catalogs/pg_indexes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
