バージョンごとのドキュメント一覧

53.30. pg_largeobject #

The catalog <structname>pg_largeobject</structname> holds the data making up <quote>large objects</quote>. A large object is identified by an OID assigned when it is created. Each large object is broken into segments or <quote>pages</quote> small enough to be conveniently stored as rows in <structname>pg_largeobject</structname>. The amount of data per page is defined to be <symbol>LOBLKSIZE</symbol> (which is currently <literal>BLCKSZ/4</literal>, or typically 2 kB). pg_largeobjectカタログはラージオブジェクトを構築するデータを保持します。 ラージオブジェクトは作成された時に割り当てられたOIDで識別されます。 それぞれのラージオブジェクトはpg_largeobjectの行に都合良く格納されるのに十分に足る小さなセグメント、もしくはページに分割されます。 ページごとのデータ量は(現在BLCKSZ/4あるいは典型的に2キロバイトの)LOBLKSIZEとして定義されます。

Prior to <productname>PostgreSQL</productname> 9.0, there was no permission structure associated with large objects. As a result, <structname>pg_largeobject</structname> was publicly readable and could be used to obtain the OIDs (and contents) of all large objects in the system. This is no longer the case; use <link linkend="catalog-pg-largeobject-metadata"><structname>pg_largeobject_metadata</structname></link> to obtain a list of large object OIDs. PostgreSQL 9.0より前までは、ラージオブジェクトに関連した権限構造はありませんでした。 その結果pg_largeobjectは可読性が高いもので、システム内のすべてのラージオブジェクトのOIDを入手するために使用できました。 これはもはや当てはまりません。 ラージオブジェクトのOIDのリストを入手するためにはpg_largeobject_metadataを使用してください。

表53.30 pg_largeobjectの列

<title><structname>pg_largeobject</structname> Columns</title>

Column Type 列 型

Description 説明

loid oid (references <link linkend="catalog-pg-largeobject-metadata"><structname>pg_largeobject_metadata</structname></link>.<structfield>oid</structfield>) (参照先 pg_largeobject_metadata.oid

Identifier of the large object that includes this page このページを含んだラージオブジェクトの識別子

pageno int4

Page number of this page within its large object (counting from zero) ラージオブジェクト内の(ゼロから数えた)このページのページ番号

data bytea

Actual data stored in the large object. This will never be more than <symbol>LOBLKSIZE</symbol> bytes and might be less. ラージオブジェクト内に保存された実データ。 LOBLKSIZEバイトを絶対上回りません。 たぶんそれより小さいでしょう。


Each row of <structname>pg_largeobject</structname> holds data for one page of a large object, beginning at byte offset (<literal>pageno * LOBLKSIZE</literal>) within the object. The implementation allows sparse storage: pages might be missing, and might be shorter than <literal>LOBLKSIZE</literal> bytes even if they are not the last page of the object. Missing regions within a large object read as zeroes. pg_largeobjectのそれぞれの行はオブジェクト内のバイトオフセット(pageno * LOBLKSIZE)から始まるラージオブジェクトの1ページ分のデータを保持します。 ページが見つからなかったり、たとえオブジェクトの最後のページでない場合でもLOBLKSIZEより小さくてもよいといった、あちこちに散らばって保存されてもよいような実装になっています。 ラージオブジェクトの中で見つからない部分はゼロとして読み込まれます。