]> begriffs open source - ai-pg/blob - full-docs/txt/catalog-pg-largeobject.txt
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / txt / catalog-pg-largeobject.txt
1
2 52.30. pg_largeobject #
3
4    The catalog pg_largeobject holds the data making up “large objects”. A
5    large object is identified by an OID assigned when it is created. Each
6    large object is broken into segments or “pages” small enough to be
7    conveniently stored as rows in pg_largeobject. The amount of data per
8    page is defined to be LOBLKSIZE (which is currently BLCKSZ/4, or
9    typically 2 kB).
10
11    Prior to PostgreSQL 9.0, there was no permission structure associated
12    with large objects. As a result, pg_largeobject was publicly readable
13    and could be used to obtain the OIDs (and contents) of all large
14    objects in the system. This is no longer the case; use
15    pg_largeobject_metadata to obtain a list of large object OIDs.
16
17    Table 52.30. pg_largeobject Columns
18
19    Column Type
20
21    Description
22
23    loid oid (references pg_largeobject_metadata.oid)
24
25    Identifier of the large object that includes this page
26
27    pageno int4
28
29    Page number of this page within its large object (counting from zero)
30
31    data bytea
32
33    Actual data stored in the large object. This will never be more than
34    LOBLKSIZE bytes and might be less.
35
36    Each row of pg_largeobject holds data for one page of a large object,
37    beginning at byte offset (pageno * LOBLKSIZE) within the object. The
38    implementation allows sparse storage: pages might be missing, and might
39    be shorter than LOBLKSIZE bytes even if they are not the last page of
40    the object. Missing regions within a large object read as zeroes.