<glossentry id="glossary-procedure">
<glossterm>Procedure (routine)</glossterm>
<glossdef>
<para>
A type of routine.
Their distinctive qualities are that they do not return values,
and that they are allowed to make transactional statements such
as <command>COMMIT</command> and <command>ROLLBACK</command>.
They are invoked via the <command>CALL</command> command.
</para>
<para>
For more information, see
<xref linkend="sql-createprocedure"/>.
</para>
</glossdef>
</glossentry>
<glossentry id="glossary-query">
<glossterm>Query</glossterm>
<glossdef>
<para>
A request sent by a client to a <glossterm linkend="glossary-backend">backend</glossterm>,
usually to return results or to modify data on the database.
</para>
</glossdef>
</glossentry>
<glossentry id="glossary-planner">
<glossterm>Query planner</glossterm>
<glossdef>
<para>
The part of <productname>PostgreSQL</productname> that is devoted to
determining (<firstterm>planning</firstterm>) the most efficient way to
execute <glossterm linkend="glossary-query">queries</glossterm>.
Also known as <firstterm>query optimizer</firstterm>,
<firstterm>optimizer</firstterm>, or simply <firstterm>planner</firstterm>.
</para>
</glossdef>
</glossentry>
<glossentry>
<glossterm>Record</glossterm>
<glosssee otherterm="glossary-tuple" />
</glossentry>
<glossentry>
<glossterm>Recycling</glossterm>
<glosssee otherterm="glossary-wal-file" />
</glossentry>
<glossentry id="glossary-referential-integrity">
<glossterm>Referential integrity</glossterm>
<glossdef>
<para>
A means of restricting data in one <glossterm linkend="glossary-relation">relation</glossterm>
by a <glossterm linkend="glossary-foreign-key">foreign key</glossterm>
so that it must have matching data in another
<glossterm linkend="glossary-relation">relation</glossterm>.
</para>
</glossdef>
</glossentry>
<glossentry id="glossary-relation">
<glossterm>Relation</glossterm>
<glossdef>
<para>
The generic term for all objects in a
<glossterm linkend="glossary-database">database</glossterm>
that have a name and a list of
<glossterm linkend="glossary-attribute">attributes</glossterm>
defined in a specific order.
<glossterm linkend="glossary-table">Tables</glossterm>,
<glossterm linkend="glossary-sequence">sequences</glossterm>,
<glossterm linkend="glossary-view">views</glossterm>,
<glossterm linkend="glossary-foreign-table">foreign tables</glossterm>,
<glossterm linkend="glossary-materialized-view">materialized views</glossterm>,
composite types, and
<glossterm linkend="glossary-index">indexes</glossterm> are all relations.
</para>
<para>
More generically, a relation is a set of tuples; for example,
the result of a query is also a relation.
</para>
<para>
In <productname>PostgreSQL</productname>,
<firstterm>Class</firstterm> is an archaic synonym for
<firstterm>relation</firstterm>.
</para>
</glossdef>
</glossentry>
<glossentry id="glossary-replica">
<glossterm>Replica (server)</glossterm>
<glossdef>
<para>
A <glossterm linkend="glossary-database">database</glossterm> that is paired
with a <glossterm linkend="glossary-primary-server">primary</glossterm>
database and is maintaining a copy of some or all of the primary database's
data. The foremost reasons for doing this are to allow for greater access
to that data, and to maintain availability of the data in the event that
the <glossterm linkend="glossary-primary-server">primary</glossterm>
becomes unavailable.
</para>
</glossdef>
</glossentry>
<glossentry id="glossary-replication">
<glossterm>Replication</glossterm>
<glossdef>
<para>
The act of reproducing data on one
<glossterm linkend="glossary-server">server</glossterm>