git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ff6de57)
Doc: clarify use of RECURSIVE in WITH.
2019年11月19日 19:43:37 +0000 (14:43 -0500)
2019年11月19日 19:43:37 +0000 (14:43 -0500)
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


diff --git a/doc/src/sgml/ref/select.sgml b/doc/src/sgml/ref/select.sgml
index 4db8142afaae944dee36a9573dbd2d0125d8b14d..c34e3621939dcaa0198b15ddf03f12e764cb62e5 100644 (file)
--- a/doc/src/sgml/ref/select.sgml
+++ b/doc/src/sgml/ref/select.sgml
@@ -281,6 +281,14 @@ TABLE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ]
reads all or any of their output.
</para>
+ <para>
+ When there are multiple queries in the <literal>WITH</literal>
+ clause, <literal>RECURSIVE</literal> should be written only once,
+ immediately after <literal>WITH</literal>. It applies to all queries
+ in the <literal>WITH</literal> clause, though it has no effect on
+ queries that do not use recursion or forward references.
+ </para>
+
<para>
The primary query and the <literal>WITH</literal> queries are all
(notionally) executed at the same time. This implies that the effects of
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /