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

# 附錄 D. SQL 符合性

### 附錄 D. SQL 符合性

**目錄**

* [D.1. 支援的特性](https://docs.postgresql.tw/19/appendixes/features/features-sql-standard.md)
* [D.2. 不支援的特性](https://docs.postgresql.tw/19/appendixes/features/unsupported-features-sql-standard.md)
* [D.3. XML 限制與 SQL/XML 符合性](https://docs.postgresql.tw/19/appendixes/features/xml-limits-conformance.md)
  * [D.3.1. 查詢僅限於 XPath 1.0](https://docs.postgresql.tw/19/appendixes/features/xml-limits-conformance.md#functions-xml-limits-xpath1)
  * [D.3.2. 實作上的附帶限制](https://docs.postgresql.tw/19/appendixes/features/xml-limits-conformance.md#functions-xml-limits-postgresql)

本節嘗試概述 PostgreSQL 在多大程度上符合現行的 SQL 標準。以下資訊並非完整的符合性聲明，但會以對使用者而言既合理又有用的詳細程度，介紹主要的議題。

SQL 標準的正式名稱是 ISO/IEC 9075「Database Language SQL」。標準會不時發佈修訂版本；最近一次更新是在 2023 年。 2023 年版稱為 ISO/IEC 9075:2023，或簡稱 SQL:2023。 在此之前的版本有 SQL:2016、SQL:2011、SQL:2008、SQL:2006、SQL:2003、 SQL:1999 與 SQL-92。每個版本都會取代前一個版本，因此宣稱符合較早的版本並沒有正式效力。 PostgreSQL 的開發目標是在不違背傳統特性或常理的前提下，符合最新正式版本的標準。SQL 標準所要求的許多特性都已獲得支援，不過有時語法或功能會略有不同。可以預期隨著時間推移，會朝符合標準的方向進一步邁進。

SQL-92 定義了三個符合性特性集：Entry、Intermediate 與 Full。大多數宣稱符合 SQL 標準的資料庫管理系統，都只符合 Entry 等級，因為 Intermediate 與 Full 等級的完整特性集不是過於龐大，就是與既有行為相衝突。

從 SQL:1999 開始，SQL 標準定義了大量個別的特性，而不再採用 SQL-92 中那三個範圍過廣而成效不彰的等級。這些特性中有一大部分屬於「Core」（核心）特性，每個符合標準的 SQL 實作都必須提供。其餘特性則純屬選用。

標準分為若干部分，每一部分也有一個簡稱：

* ISO/IEC 9075-1 框架（SQL/Framework）
* ISO/IEC 9075-2 基礎（SQL/Foundation）
* ISO/IEC 9075-3 呼叫層級介面（SQL/CLI）
* ISO/IEC 9075-4 永續儲存模組（SQL/PSM）
* ISO/IEC 9075-9 外部資料管理（SQL/MED）
* ISO/IEC 9075-10 物件語言繫結（SQL/OLB）
* ISO/IEC 9075-11 資訊與定義綱要（SQL/Schemata）
* ISO/IEC 9075-13 使用 Java 語言的常式與型別（SQL/JRT）
* ISO/IEC 9075-14 XML 相關規範（SQL/XML）
* ISO/IEC 9075-15 多維陣列（SQL/MDA）
* ISO/IEC 9075-16 屬性圖查詢（SQL/PGQ）

請注意，有些部分編號未被使用（或已不再使用）。

PostgreSQL 核心涵蓋第 1、2、9、 11 與 14 部分。第 3 部分由 ODBC 驅動程式涵蓋，第 13 部分則由 PL/Java 外掛涵蓋，但這些元件目前並未驗證其確切的符合程度。目前 PostgreSQL 沒有第 4、10、15 與 16 部分的實作。

PostgreSQL 支援 SQL:2023 的大部分主要特性。在完整符合 Core 所需的 177 項必要特性中， PostgreSQL 至少符合 170 項。此外，還支援一長串的選用特性。值得一提的是，在撰寫本文時，沒有任何資料庫管理系統的現行版本宣稱完全符合 Core SQL:2023。

在接下來的兩節中，我們會先列出 PostgreSQL 支援的特性，接著列出 SQL:2023 中定義但 PostgreSQL 尚未支援的特性。 這兩份清單都只是近似的：列為支援的特性，可能仍有部分細節不符合標準；而不支援的特性，實際上可能已實作了其中一大部分。 文件的正文部分永遠提供關於哪些功能可用、哪些不可用的最準確資訊。

#### 注意

含有連字號的特性代碼是子特性。因此，若某個子特性不受支援，即使其他部分子特性已受支援，其主特性仍會列為不支援。

***

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


---

# 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/appendixes/features.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.
