Skip to content

Commit ba3afc8

Browse files
committed
Document that WITH queries are also called Common Table Expressions.
Peter Geoghegan, reviewed by Stephen Frost
1 parent d8b0495 commit ba3afc8

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

doc/src/sgml/acronyms.sgml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,15 @@
9898
</listitem>
9999
</varlistentry>
100100

101+
<varlistentry>
102+
<term><acronym>CTE</acronym></term>
103+
<listitem>
104+
<para>
105+
<link linkend="queries-with">Common Table Expression</link>
106+
</para>
107+
</listitem>
108+
</varlistentry>
109+
101110
<varlistentry>
102111
<term><acronym>CVE</acronym></term>
103112
<listitem>

doc/src/sgml/queries.sgml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1516,7 +1516,7 @@ SELECT <replaceable>select_list</replaceable> FROM <replaceable>table_expression
15161516

15171517

15181518
<sect1 id="queries-with">
1519-
<title><literal>WITH</literal> Queries</title>
1519+
<title><literal>WITH</literal> Queries (Common Table Expressions)</title>
15201520

15211521
<indexterm zone="queries-with">
15221522
<primary>WITH</primary>
@@ -1530,7 +1530,8 @@ SELECT <replaceable>select_list</replaceable> FROM <replaceable>table_expression
15301530

15311531
<para>
15321532
<literal>WITH</> provides a way to write subqueries for use in a larger
1533-
<literal>SELECT</> query. The subqueries can be thought of as defining
1533+
<literal>SELECT</> query. The subqueries, which are often referred to as Common Table
1534+
Expressions or <acronym>CTE</acronym>s, can be thought of as defining
15341535
temporary tables that exist just for this query. One use of this feature
15351536
is to break down complicated queries into simpler parts. An example is:
15361537

0 commit comments

Comments
 (0)