postgres.git / summary / log / commit / refs
commit 16a9165ce4a45f11aa042e12ab62be8ce6b2b93b
Author: Álvaro Herrera <alvherre@kurilemu.de>
Date: Thu Aug 28 16:16:08 2025 +0000
Glossary: improve definition of "relation"
Define the more general term first, then the Postgres-specific meaning.
Wording from Tom Lane.
Discussion: https://postgr.es/m/CACJufxEZ48toGH0Em_6vdsT57Y3L8pLF=DZCQ_gCii6=C3MeXw@mail.gmail.com
doc/src/sgml/glossary.sgml | 27 +++++++++++++++------------
1 file changed, 15 insertions(+), 12 deletions(-)
diff --git a/doc/src/sgml/glossary.sgml b/doc/src/sgml/glossary.sgml
index b88cac598e9..8651f0cdb91 100644
--- a/doc/src/sgml/glossary.sgml
+++ b/doc/src/sgml/glossary.sgml
@@ -1419,11 +1419,15 @@
<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.
+ Mathematically, a <firstterm>relation</firstterm> is a set of
+ <glossterm linkend="glossary-tuple">tuples</glossterm>;
+ this is the sense meant in the term "relational database".
+ </para>
+
+ <para>
+ In <productname>PostgreSQL</productname>, "relation" is commonly used to
+ mean an <glossterm linkend="glossary-sql-object">SQL object</glossterm>
+ that has a name and a list of attributes defined in a specific order.
<glossterm linkend="glossary-table">Tables</glossterm>,
<glossterm linkend="glossary-sequence">sequences</glossterm>,
<glossterm linkend="glossary-view">views</glossterm>,
@@ -1431,15 +1435,14 @@
<glossterm linkend="glossary-materialized-view">materialized views</glossterm>,
composite types, and
<glossterm linkend="glossary-index">indexes</glossterm> are all relations.
+ A relation in this sense is a container or a descriptor for a set of tuples.
</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>.
+ <firstterm>Class</firstterm> is an alternative but archaic term.
+ The system catalog
+ <link linkend="catalog-pg-class"><structname>pg_class</structname></link>
+ holds an entry for each <productname>PostgreSQL</productname> relation.
</para>
</glossdef>
</glossentry>
[parent: 325fc0ab14d1]