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

# 35.2. 資料型別 \#

### 35.2. 資料型別 [#](#infoschema-datatypes) <a href="#infoschema-datatypes" id="infoschema-datatypes"></a>

資訊結構描述檢視表的欄位使用在資訊結構描述中定義的特殊資料型別。這些型別 定義為一般內建型別上的簡單 domain。請勿將這些型別用於資訊結構描述以外的用途； 不過，若應用程式會從資訊結構描述選取資料，就必須能處理它們。

這些型別如下：

`cardinal_number` : 非負整數。

`character_data` : 字串（沒有指定最大長度）。

`sql_identifier` : 字串。此型別用於 SQL 識別字；`character_data` 型別則用於其他任何種類的 文字資料。

`time_stamp` : `timestamp with time zone` 型別上的 domain。

`yes_or_no` : 只包含 `YES` 或 `NO` 的字串 domain。此型別用於表示資訊結構描述中的 Boolean（true/false）資料。（資訊結構描述在 SQL 標準加入 `boolean` 型別之前就已制定，因此必須使用這項慣例以維持向後相容。）

資訊結構描述中的每個欄位都使用這五種型別之一。

***

原文：[PostgreSQL 18.6 Documentation](https://www.postgresql.org/docs/18/infoschema-datatypes.html)（原文版本：18.6；核對日期：2026-09-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/client-interfaces/information-schema/infoschema-datatypes.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.
