Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1odafD-0004Sg-Qc for pgsql-committers@arkaria.postgresql.org; Wed, 28 Sep 2022 17:16:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1odaeE-0005xG-PR for pgsql-committers@arkaria.postgresql.org; Wed, 28 Sep 2022 17:15:02 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1odaeE-0005wk-Ii for pgsql-committers@lists.postgresql.org; Wed, 28 Sep 2022 17:15:02 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1odaeC-0000k9-BR for pgsql-committers@lists.postgresql.org; Wed, 28 Sep 2022 17:15:01 +0000 Received: from bruce by momjian.us with local (Exim 4.94.2) (envelope-from ) id 1odae8-00A55X-IK; Wed, 28 Sep 2022 13:14:56 -0400 Date: Wed, 28 Sep 2022 13:14:56 -0400 From: Bruce Momjian To: Tom Lane Cc: Robert Haas , Peter Eisentraut , pgsql-committers Subject: Re: pgsql: doc: clarify recursion internal behavior Message-ID: References: <3976627.1662651004@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="CevKHOkmANXcR9dm" Content-Disposition: inline In-Reply-To: <3976627.1662651004@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --CevKHOkmANXcR9dm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Sep 8, 2022 at 11:30:04AM -0400, Tom Lane wrote: > Robert Haas writes: > > On Thu, Sep 8, 2022 at 7:24 AM Peter Eisentraut > > wrote: > >> On 03.09.22 03:58, Bruce Momjian wrote: > >>> + While RECURSIVE allows queries to be specified > >>> + recursively, internally all queries are evaluated iteratively. > > >> Is that true? Surely there is some recursive behavior in the executor. > > > I haven't read the patch, but I think the claim shown here is correct. > > I'd be happier if it read "such queries" instead of "all queries". > The latter is an extremely broad claim, and you have to ignore cases > like recursive SQL functions in order to even argue it's true. Done in the attached applied patch. -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com Indecision is a decision. Inaction is an action. Mark Batterson --CevKHOkmANXcR9dm Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="master.diff" diff --git a/doc/src/sgml/queries.sgml b/doc/src/sgml/queries.sgml index 4c5a83c9cb..95559ef1ac 100644 --- a/doc/src/sgml/queries.sgml +++ b/doc/src/sgml/queries.sgml @@ -2173,7 +2173,7 @@ SELECT sum(n) FROM t; While RECURSIVE allows queries to be specified - recursively, internally all queries are evaluated iteratively. + recursively, internally such queries are evaluated iteratively. --CevKHOkmANXcR9dm--