Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rtqbw-000IEI-00 for pgsql-hackers@arkaria.postgresql.org; Mon, 08 Apr 2024 15:08:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rtqbt-008Ekw-G2 for pgsql-hackers@arkaria.postgresql.org; Mon, 08 Apr 2024 15:08:37 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rtqbt-008Ekn-6v for pgsql-hackers@lists.postgresql.org; Mon, 08 Apr 2024 15:08:37 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rtqbm-001qLD-Lh for pgsql-hackers@postgresql.org; Mon, 08 Apr 2024 15:08:35 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 438F8O373275591; Mon, 8 Apr 2024 11:08:24 -0400 From: Tom Lane To: Alexander Lakhin cc: Daniel Verite , Laurenz Albe , PostgreSQL Hackers , Robert Haas , Jakub Wartak Subject: Re: psql's FETCH_COUNT (cursor) is not being respected for CTEs In-reply-to: <0023bea5-79c0-476e-96c8-dad599cc3ad8@gmail.com> References: <10117fba-890b-46ac-9316-cae83108a6a6@manitou-mail.org> <0023bea5-79c0-476e-96c8-dad599cc3ad8@gmail.com> Comments: In-reply-to Alexander Lakhin message dated "Mon, 08 Apr 2024 18:00:00 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <3275589.1712588904.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 08 Apr 2024 11:08:24 -0400 Message-ID: <3275590.1712588904@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Alexander Lakhin writes: > Now that ExecQueryUsingCursor() is gone, it's not clear, what does > the following comment mean:? > =C2=A0=C2=A0 * We must turn off gexec_flag to avoid infinite recursion.= =C2=A0 Note that > =C2=A0=C2=A0 * this allows ExecQueryUsingCursor to be applied to the in= dividual query > =C2=A0=C2=A0 * results. Hmm, the point about recursion is still valid isn't it? I agree the reference to ExecQueryUsingCursor is obsolete, but I think we need to reconstruct what this comment is actually talking about. It's certainly pretty obscure ... regards, tom lane