Home Explore Blog CI



postgresql

10th chunk of `doc/src/sgml/glossary.sgml`
c60fb5816bc471227fde0629db00f3903948ccffd5fc4cbc0000000100000fb0
    <glossterm linkend="glossary-foreign-table">foreign tables</glossterm>.
    </para>
    <para>
     For more information, see
     <xref linkend="sql-createforeigndatawrapper"/>.
    </para>
   </glossdef>
  </glossentry>

  <glossentry id="glossary-foreign-key">
   <glossterm>Foreign key</glossterm>
   <glossdef>
    <para>
     A type of <glossterm linkend="glossary-constraint">constraint</glossterm>
     defined on one or more <glossterm linkend="glossary-column">columns</glossterm>
     in a <glossterm linkend="glossary-table">table</glossterm> which
     requires the value(s) in those <glossterm linkend="glossary-column">columns</glossterm> to
     identify zero or one <glossterm linkend="glossary-tuple">row</glossterm>
     in another (or, infrequently, the same)
     <glossterm linkend="glossary-table">table</glossterm>.
    </para>
   </glossdef>
  </glossentry>

  <glossentry id="glossary-foreign-server">
   <glossterm>Foreign server</glossterm>
   <glossdef>
    <para>
     A named collection of
     <glossterm linkend="glossary-foreign-table">foreign tables</glossterm> which
     all use the same
     <glossterm linkend="glossary-foreign-data-wrapper">foreign data wrapper</glossterm>
     and have other configuration values in common.
    </para>
    <para>
     For more information, see
     <xref linkend="sql-createserver"/>.
    </para>
   </glossdef>
  </glossentry>

  <glossentry id="glossary-foreign-table">
   <glossterm>Foreign table (relation)</glossterm>
   <glossdef>
    <para>
     A <glossterm linkend="glossary-relation">relation</glossterm> which appears to have
     <glossterm linkend="glossary-tuple">rows</glossterm> and
     <glossterm linkend="glossary-column">columns</glossterm> similar to a
     regular <glossterm linkend="glossary-table">table</glossterm>, but will forward
     requests for data through its
     <glossterm linkend="glossary-foreign-data-wrapper">foreign data wrapper</glossterm>,
     which will return <glossterm linkend="glossary-result-set">result sets</glossterm>
     structured according to the definition of the
     <glossterm linkend="glossary-foreign-table">foreign table</glossterm>.
    </para>
    <para>
     For more information, see
     <xref linkend="sql-createforeigntable"/>.
    </para>
   </glossdef>
  </glossentry>

  <glossentry id="glossary-fork">
   <glossterm>Fork</glossterm>
   <glossdef>
    <para>
     Each of the separate segmented file sets in which a relation is stored.
     The <firstterm>main fork</firstterm> is where the actual data resides.
     There also exist two secondary forks for metadata:
     the <glossterm linkend="glossary-fsm">free space map</glossterm>
     and the <glossterm linkend="glossary-vm">visibility map</glossterm>.
     <glossterm linkend="glossary-unlogged">Unlogged relations</glossterm>
     also have an <firstterm>init fork</firstterm>.
    </para>
   </glossdef>
  </glossentry>

  <glossentry id="glossary-fsm">
   <glossterm>Free space map (fork)</glossterm>
   <glossdef>
    <para>
     A storage structure that keeps metadata about each data page of a table's
     main fork.  The free space map entry for each page stores the
     amount of free space that's available for future tuples, and is structured
     to be efficiently searched for available space for a new tuple of a given
     size.
    </para>
    <para>
     For more information, see
     <xref linkend="storage-fsm"/>.
    </para>
   </glossdef>
  </glossentry>

  <glossentry id="glossary-function">
   <glossterm>Function (routine)</glossterm>
   <glossdef>
    <para>
     A type of routine that receives zero or more arguments, returns zero or more
     output values, and is constrained to run within one transaction.
     Functions are invoked as part of a query, for example via
     <command>SELECT</command>.
     Certain functions can return
     <glossterm linkend="glossary-result-set">sets</glossterm>; those are
     called <firstterm>set-returning functions</firstterm>.

Title: PostgreSQL Foreign Data Concepts and Storage Structures
Summary
This section explains several concepts related to foreign data handling and storage structures in PostgreSQL. It defines foreign servers as collections of foreign tables using the same foreign data wrapper. Foreign tables are described as relations that appear like regular tables but forward data requests through a foreign data wrapper. The text also introduces the concept of forks in relation storage, including the main fork for actual data and secondary forks for metadata such as the free space map and visibility map. The free space map is detailed as a storage structure that keeps track of available space in data pages for efficient tuple insertion. Lastly, the passage begins to describe functions in PostgreSQL, highlighting their ability to receive arguments, return values, and potentially return sets of data.