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

# 52.30. pg\_largeobject \#

### 52.30. `pg_largeobject` [#](#catalog-pg-largeobject) <a href="#catalog-pg-largeobject" id="catalog-pg-largeobject"></a>

目錄 `pg_largeobject` 存放構成「大型物件」的資料。大型物件以建立時所指派的 OID 識別。每個大型物件都會被拆分成多個區段，或稱「頁面」，其大小足以方便地以資料列的形式存放在 `pg_largeobject` 中。每頁的資料量定義為 `LOBLKSIZE`（目前為 `BLCKSZ/4`，通常是 2 kB）。

在 PostgreSQL 9.0 之前，大型物件沒有相關聯的權限結構。因此，`pg_largeobject` 可供公開讀取，並可用來取得系統中所有大型物件的 OID（及內容）。現在已不再如此；請使用 [`pg_largeobject_metadata`](https://docs.postgresql.tw/19/internals/catalogs/catalog-pg-largeobject-metadata.md) 取得大型物件 OID 的清單。

#### 表 52.30. `pg_largeobject` 欄位 [#](#catalog-pg-largeobject-columns) <a href="#catalog-pg-largeobject-columns" id="catalog-pg-largeobject-columns"></a>

| <p>欄位類型</p><p>說明</p>                                                                                                                                                                                                          |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><code>loid</code> <code>oid</code> （參照 <a href="https://docs.postgresql.tw/19/internals/catalogs/catalog-pg-largeobject-metadata.md"><code>pg\_largeobject\_metadata</code></a>.<code>oid</code>）</p><p>包含此頁面之大型物件的識別碼</p> |
| <p><code>pageno</code> <code>int4</code></p><p>此頁面在其大型物件中的頁碼（從零起算）</p>                                                                                                                                                        |
| <p><code>data</code> <code>bytea</code></p><p>存放在大型物件中的實際資料。其長度絕不會超過 <code>LOBLKSIZE</code> 位元組，也可能較少。</p>                                                                                                                    |

<br>

`pg_largeobject` 的每個資料列存放大型物件中一個頁面的資料，從該物件內的位元組偏移量（`pageno * LOBLKSIZE`）開始。此實作允許稀疏儲存：頁面可能不存在，而且即使不是物件的最後一頁，也可能短於 `LOBLKSIZE` 位元組。大型物件內不存在的區域讀取時為零。

***

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


---

# 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/internals/catalogs/catalog-pg-largeobject.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.
