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 1sDtXV-00FswM-2L for pgsql-bugs@arkaria.postgresql.org; Sun, 02 Jun 2024 22:18:58 +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 1sDtXU-008CFn-Sq for pgsql-bugs@arkaria.postgresql.org; Sun, 02 Jun 2024 22:18:56 +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 1sDtXU-008CFe-KL for pgsql-bugs@lists.postgresql.org; Sun, 02 Jun 2024 22:18:56 +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 1sDtXS-003A6e-8V for pgsql-bugs@lists.postgresql.org; Sun, 02 Jun 2024 22:18:55 +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 452MIpm92365648; Sun, 2 Jun 2024 18:18:51 -0400 From: Tom Lane To: "David G. Johnston" cc: Mor Lehr , "pgsql-bugs@lists.postgresql.org" Subject: Re: Missing semicolumn in anonymous plpgsql block does not raise syntax error In-reply-to: References: Comments: In-reply-to "David G. Johnston" message dated "Sun, 02 Jun 2024 09:19:12 -0600" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2365646.1717366731.1@sss.pgh.pa.us> Date: Sun, 02 Jun 2024 18:18:51 -0400 Message-ID: <2365647.1717366731@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "David G. Johnston" writes: > I think you just wrote the equivalent of: > l_cnt := (select 1 as delete from foo3 where id=1); > Which is a valid query. Still another example of the folly of letting AS be optional. I don't suppose we can ever undo that though. regards, tom lane