> 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/reference/reference-client.md). Agents can also search and read this documentation through its [MCP server](https://docs.postgresql.tw/~gitbook/mcp).

# PostgreSQL 用戶端應用程式

## PostgreSQL 用戶端應用程式

***

本部分包含 PostgreSQL 用戶端應用程式與工具程式的參考資訊。這些命令並非全都具有一般用途；有些可能需要特殊權限。這些應用程式的共同特點是，無論資料庫伺服器位於何處，都可以在任何主機上執行。

在命令列上指定時，使用者名稱與資料庫名稱會保留其大小寫——若含有空格或特殊字元，可能需要加上引號。資料表名稱與其他識別字則不會保留大小寫（文件另有說明者除外），並且可能需要加上引號。

**目錄**

[clusterdb](https://docs.postgresql.tw/19/reference/reference-client/app-clusterdb.md) — 叢集化 PostgreSQL 資料庫

[createdb](https://docs.postgresql.tw/19/reference/reference-client/app-createdb.md) — 建立新的 PostgreSQL 資料庫

[createuser](https://docs.postgresql.tw/19/reference/reference-client/app-createuser.md) — 定義新的 PostgreSQL 使用者帳號

[dropdb](https://docs.postgresql.tw/19/reference/reference-client/app-dropdb.md) — 移除 PostgreSQL 資料庫

[dropuser](https://docs.postgresql.tw/19/reference/reference-client/app-dropuser.md) — 移除 PostgreSQL 使用者帳號

[ecpg](https://docs.postgresql.tw/19/reference/reference-client/app-ecpg.md) — 嵌入式 SQL C 前置處理器

[pg\_amcheck](https://docs.postgresql.tw/19/reference/reference-client/app-pgamcheck.md) — 檢查一個或多個 PostgreSQL 資料庫是否損毀

[pg\_basebackup](https://docs.postgresql.tw/19/reference/reference-client/app-pgbasebackup.md) — 取得 PostgreSQL 叢集的基礎備份

[pgbench](https://docs.postgresql.tw/19/reference/reference-client/pgbench.md) — 在 PostgreSQL 上執行效能基準測試

相關子頁：[pgbench 初始化步驟](https://docs.postgresql.tw/19/reference/reference-client/pgbench/pgbench-init-steps.md)。

[pg\_combinebackup](https://docs.postgresql.tw/19/reference/reference-client/app-pgcombinebackup.md) — 從增量備份及其相依的備份重建完整備份

[pg\_config](https://docs.postgresql.tw/19/reference/reference-client/app-pgconfig.md) — 取得已安裝之 PostgreSQL 版本的相關資訊

[pg\_dump](https://docs.postgresql.tw/19/reference/reference-client/app-pgdump.md) — 將 PostgreSQL 資料庫匯出為 SQL 腳本或其他格式

[pg\_dumpall](https://docs.postgresql.tw/19/reference/reference-client/app-pg-dumpall.md) — 將 PostgreSQL 資料庫叢集匯出為腳本檔案

[pg\_isready](https://docs.postgresql.tw/19/reference/reference-client/app-pg-isready.md) — 檢查 PostgreSQL 伺服器的連線狀態

[pg\_receivewal](https://docs.postgresql.tw/19/reference/reference-client/app-pgreceivewal.md) — 從 PostgreSQL 伺服器串流接收預寫式日誌

[pg\_recvlogical](https://docs.postgresql.tw/19/reference/reference-client/app-pgrecvlogical.md) — 控制 PostgreSQL 邏輯解碼串流

[pg\_restore](https://docs.postgresql.tw/19/reference/reference-client/app-pgrestore.md) — 從 pg\_dump 建立的封存檔還原 PostgreSQL 資料庫

[pg\_verifybackup](https://docs.postgresql.tw/19/reference/reference-client/app-pgverifybackup.md) — 驗證 PostgreSQL 叢集基礎備份的完整性

[psql](https://docs.postgresql.tw/19/reference/reference-client/app-psql.md) — PostgreSQL 互動式終端機

相關子頁：[psql：\pset 列印選項](https://docs.postgresql.tw/19/reference/reference-client/app-psql/app-psql-print-options.md)、[psql：模式](https://docs.postgresql.tw/19/reference/reference-client/app-psql/app-psql-patterns.md)。

[reindexdb](https://docs.postgresql.tw/19/reference/reference-client/app-reindexdb.md) — 重建 PostgreSQL 資料庫的索引

[vacuumdb](https://docs.postgresql.tw/19/reference/reference-client/app-vacuumdb.md) — 對 PostgreSQL 資料庫進行垃圾回收與分析

***

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


---

# 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/reference/reference-client.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.
