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 1qLaaA-000CJ1-2o for pgsql-docs@arkaria.postgresql.org; Tue, 18 Jul 2023 02:36:57 +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 1qLaa6-002Ucz-Py for pgsql-docs@arkaria.postgresql.org; Tue, 18 Jul 2023 02:36:54 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qLaa6-002UYQ-Hx for pgsql-docs@lists.postgresql.org; Tue, 18 Jul 2023 02:36:54 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qLaa1-0002yi-4N for pgsql-docs@lists.postgresql.org; Tue, 18 Jul 2023 02:36:53 +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 36I2akmE4124247; Mon, 17 Jul 2023 22:36:47 -0400 From: Tom Lane To: "David G. Johnston" cc: Curt Kolovson , pgsql-docs@lists.postgresql.org Subject: Re: Bug in documentation: https://www.postgresql.org/docs/current/spi-examples.html In-reply-to: References: <4114624.1689643322@sss.pgh.pa.us> Comments: In-reply-to "David G. Johnston" message dated "Mon, 17 Jul 2023 19:21:45 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <4124245.1689647806.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 17 Jul 2023 22:36:46 -0400 Message-ID: <4124246.1689647806@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "David G. Johnston" writes: > On Mon, Jul 17, 2023 at 6:22=E2=80=AFPM Tom Lane wro= te: >> I think his point is that this example does not behave as the >> documentation claims. Which it does not, according to my >> tests here. I find this a bit disturbing --- did we intentionally >> change the behavior of SPI_exec somewhere along the line? > Appears to be a documentation fix oversight back in v9.0 > https://github.com/postgres/postgres/commit/2ddc600f8f0252a0864e85d5cc1e= eb3b9687d7e9 Ah, thanks for the pointer. I'd just been trying to bisect where between 8.4 and 9.0 it changed, but failed because early-9.0 versions don't build at all with current bison :-( Anyway, given that the example needs updating, how should we do that exactly? Is it worth demonstrating both the behavior with RETURNING and that without? If not, which one to show? regards, tom lane