Home Explore Blog CI



postgresql

59th chunk of `doc/src/sgml/catalogs.sgml`
8bbda4dac471d99ac716d2db8257997733ea086961ca1e3b0000000100000fb1
 not supported.
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>lanvalidator</structfield> <type>oid</type>
       (references <link linkend="catalog-pg-proc"><structname>pg_proc</structname></link>.<structfield>oid</structfield>)
      </para>
      <para>
       This references a language validator function that is responsible
       for checking the syntax and validity of new functions when they
       are created.  Zero if no validator is provided.
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>lanacl</structfield> <type>aclitem[]</type>
      </para>
      <para>
       Access privileges; see <xref linkend="ddl-priv"/> for details
      </para></entry>
     </row>
    </tbody>
   </tgroup>
  </table>

 </sect1>


 <sect1 id="catalog-pg-largeobject">
  <title><structname>pg_largeobject</structname></title>

  <indexterm zone="catalog-pg-largeobject">
   <primary>pg_largeobject</primary>
  </indexterm>

  <para>
   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).
  </para>

  <para>
   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.
  </para>

  <table>
   <title><structname>pg_largeobject</structname> Columns</title>
   <tgroup cols="1">
    <thead>
     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       Column Type
      </para>
      <para>
       Description
      </para></entry>
     </row>
    </thead>

    <tbody>
     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>loid</structfield> <type>oid</type>
       (references <link linkend="catalog-pg-largeobject-metadata"><structname>pg_largeobject_metadata</structname></link>.<structfield>oid</structfield>)
      </para>
      <para>
       Identifier of the large object that includes this page
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>pageno</structfield> <type>int4</type>
      </para>
      <para>
       Page number of this page within its large object
       (counting from zero)
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>data</structfield> <type>bytea</type>
      </para>
      <para>
       Actual data stored in the large object.
       This will never be more than <symbol>LOBLKSIZE</symbol> bytes and might be less.
      </para></entry>
     </row>
    </tbody>
   </tgroup>
  </table>

  <para>
   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.
  </para>

 </sect1>

 <sect1 id="catalog-pg-largeobject-metadata">

Title: pg_language Columns (Cont.) and pg_largeobject
Summary
This section continues describing columns in the `pg_language` table: `lanvalidator` (OID of the language validator function) and `lanacl` (access privileges). Then, it introduces the `pg_largeobject` catalog, which stores the data for large objects, broken into pages of size `LOBLKSIZE`. Each row represents a page, with `loid` being the large object's identifier, `pageno` the page number, and `data` the actual data. The implementation allows sparse storage, with missing pages reading as zeroes. Finally, the section indicates the start of `pg_largeobject_metadata` catalog documentation.