Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5b80588

Browse filesBrowse files
committed
Doc: clarify use of RECURSIVE in WITH.
Apparently some people misinterpreted the syntax as being that RECURSIVE is a prefix of individual WITH queries. It's a modifier for the WITH clause as a whole, so state that more clearly. Discussion: https://postgr.es/m/ca53c6ce-a0c6-b14a-a8e3-162f0b2cc119@a-kretschmer.de
1 parent 787b3fd commit 5b80588
Copy full SHA for 5b80588

File tree

Expand file treeCollapse file tree

1 file changed

+8
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+8
-0
lines changed

‎doc/src/sgml/ref/select.sgml

Copy file name to clipboardExpand all lines: doc/src/sgml/ref/select.sgml
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,14 @@ TABLE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ]
273273
that are earlier in the <literal>WITH</literal> list.
274274
</para>
275275

276+
<para>
277+
When there are multiple queries in the <literal>WITH</literal>
278+
clause, <literal>RECURSIVE</literal> should be written only once,
279+
immediately after <literal>WITH</literal>. It applies to all queries
280+
in the <literal>WITH</literal> clause, though it has no effect on
281+
queries that do not use recursion or forward references.
282+
</para>
283+
276284
<para>
277285
The primary query and the <literal>WITH</literal> queries are all
278286
(notionally) executed at the same time. This implies that the effects of

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.