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 1mWsU1-0006VS-5Z for pgsql-bugs@arkaria.postgresql.org; Sun, 03 Oct 2021 03:48:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mWsTz-0007jR-Hv for pgsql-bugs@arkaria.postgresql.org; Sun, 03 Oct 2021 03:48:11 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mWsTz-0007jJ-BN for pgsql-bugs@lists.postgresql.org; Sun, 03 Oct 2021 03:48:11 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mWsTx-0007yn-B3 for pgsql-bugs@lists.postgresql.org; Sun, 03 Oct 2021 03:48:11 +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 1933m6I43735894; Sat, 2 Oct 2021 23:48:06 -0400 From: Tom Lane To: Marc Bachmann cc: Robert Haas , jeremy@musicsmith.net, PostgreSQL mailing lists Subject: Re: BUG #16040: PL/PGSQL RETURN QUERY statement never uses a parallel plan In-reply-to: <1F2F75F0-27DF-406F-848D-8B50C7EEF06A@gmail.com> References: <16040-eaacad11fecfb198@postgresql.org> <1741.1584847383@sss.pgh.pa.us> <1F2F75F0-27DF-406F-848D-8B50C7EEF06A@gmail.com> Comments: In-reply-to Marc Bachmann message dated "Sun, 03 Oct 2021 04:20:17 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3735892.1633232886.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sat, 02 Oct 2021 23:48:06 -0400 Message-ID: <3735893.1633232886@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Marc Bachmann writes: > A function that inserts data and tries to return with a table now result= s in the error `query is not a SELECT`. > In previous versions that query succeeded. Hmm ... I'm a bit surprised that that worked before, but since it did, we shouldn't break it. It looks like this was an accidental side-effect of refactoring rather than something intentional. Will look closer tomorrow or so. regards, tom lane