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 1mwsKM-0005M7-Hm for pgsql-general@arkaria.postgresql.org; Mon, 13 Dec 2021 20:53:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mwsKL-0006Wq-Ai for pgsql-general@arkaria.postgresql.org; Mon, 13 Dec 2021 20:53:41 +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 1mwsKL-0006Wg-0H for pgsql-general@lists.postgresql.org; Mon, 13 Dec 2021 20:53:41 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mwsKI-0007mC-Nv for pgsql-general@lists.postgresql.org; Mon, 13 Dec 2021 20:53:39 +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 1BDKrbvM872343; Mon, 13 Dec 2021 15:53:37 -0500 From: Tom Lane To: Bryn Llewellyn cc: pgsql-general list Subject: Re: Why can't I have a "language sql" anonymous block? In-reply-to: References: Comments: In-reply-to Bryn Llewellyn message dated "Mon, 13 Dec 2021 12:45:48 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <872341.1639428817.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 13 Dec 2021 15:53:37 -0500 Message-ID: <872342.1639428817@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Bryn Llewellyn writes: > Was there a deliberate decision not to allow a =E2=80=9Clanguage sql=E2=80= =9D anonymous block? Or is it just that nobody thought that it would be us= eful? I think nobody thought it'd be useful. What's the difference from just executing the contained SQL statements? (If DO blocks had parameters, the conclusion might be different, but they don't so far.) regards, tom lane