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

# 第 33 章 大型物件

### 第 33 章 大型物件

**目錄**

* [33.1. 簡介](https://docs.postgresql.tw/19/client-interfaces/largeobjects/lo-intro.md)
* [33.2. 實作特性](https://docs.postgresql.tw/19/client-interfaces/largeobjects/lo-implementation.md)
* [33.3. 用戶端介面](https://docs.postgresql.tw/19/client-interfaces/largeobjects/lo-interfaces.md)
  * [33.3.1. 建立大型物件](https://docs.postgresql.tw/19/client-interfaces/largeobjects/lo-interfaces.md#lo-create)
  * [33.3.2. 匯入大型物件](https://docs.postgresql.tw/19/client-interfaces/largeobjects/lo-interfaces.md#lo-import)
  * [33.3.3. 匯出大型物件](https://docs.postgresql.tw/19/client-interfaces/largeobjects/lo-interfaces.md#lo-export)
  * [33.3.4. 開啟既有的大型物件](https://docs.postgresql.tw/19/client-interfaces/largeobjects/lo-interfaces.md#lo-open)
  * [33.3.5. 將資料寫入大型物件](https://docs.postgresql.tw/19/client-interfaces/largeobjects/lo-interfaces.md#lo-write)
  * [33.3.6. 從大型物件讀取資料](https://docs.postgresql.tw/19/client-interfaces/largeobjects/lo-interfaces.md#lo-read)
  * [33.3.7. 在大型物件中移動位置](https://docs.postgresql.tw/19/client-interfaces/largeobjects/lo-interfaces.md#lo-seek)
  * [33.3.8. 取得大型物件的目前位置](https://docs.postgresql.tw/19/client-interfaces/largeobjects/lo-interfaces.md#lo-tell)
  * [33.3.9. 截斷大型物件](https://docs.postgresql.tw/19/client-interfaces/largeobjects/lo-interfaces.md#lo-truncate)
  * [33.3.10. 關閉大型物件描述子](https://docs.postgresql.tw/19/client-interfaces/largeobjects/lo-interfaces.md#lo-close)
  * [33.3.11. 移除大型物件](https://docs.postgresql.tw/19/client-interfaces/largeobjects/lo-interfaces.md#lo-unlink)
* [33.4. 伺服器端函式](https://docs.postgresql.tw/19/client-interfaces/largeobjects/lo-funcs.md)
* [33.5. 範例程式](https://docs.postgresql.tw/19/client-interfaces/largeobjects/lo-examplesect.md)

PostgreSQL 具有*大型物件* 功能，可對儲存在特殊大型物件結構中的使用者資料， 提供串流式的存取。當處理的資料值太大、 不便以整體方式操作時，串流存取就很有用。

本章說明 PostgreSQL 大型物件資料的實作， 以及其程式設計與查詢語言介面。本章的範例使用 libpq C 函式庫，但大多數 PostgreSQL 原生的程式設計介面都支援 同等的功能。其他介面可能會在內部使用大型 物件介面，以提供對大型值的通用支援。 這部分不在此說明。

***

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


---

# 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/largeobjects.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.
