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 1qdVyD-003hxt-2I for pgsql-general@arkaria.postgresql.org; Tue, 05 Sep 2023 13:19:53 +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 1qdVyA-002CZG-Sk for pgsql-general@arkaria.postgresql.org; Tue, 05 Sep 2023 13:19:50 +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 1qdVyA-002CZ1-Ga for pgsql-general@lists.postgresql.org; Tue, 05 Sep 2023 13:19:50 +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 1qdVy7-002s5k-9T for pgsql-general@lists.postgresql.org; Tue, 05 Sep 2023 13:19:49 +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 385DJeqe1314501; Tue, 5 Sep 2023 09:19:40 -0400 From: Tom Lane To: Alvaro Herrera cc: Erik Wienhold , "David G. Johnston" , "pgsql-general@lists.postgresql.org" Subject: Re: rollback to savepoint issue In-reply-to: <202309051201.hnghlq3bit25@alvherre.pgsql> References: <202309051201.hnghlq3bit25@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Tue, 05 Sep 2023 14:01:44 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1314499.1693919980.1@sss.pgh.pa.us> Date: Tue, 05 Sep 2023 09:19:40 -0400 Message-ID: <1314500.1693919980@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Alvaro Herrera writes: > But it gets worse. If you create a procedure (no longer a function) > with a SAVEPOINT and ROLLBACK TO SAVEPOINT, it'll complain about the > ROLLBACK TO command, but not about SAVEPOINT; and if you remove that, > then it'll fail at runtime saying that SAVEPOINT is unsupported. ROLLBACK in plpgsql is a different command with different syntax options than the core grammar has. So this is a matter of when syntax errors are detected vs. when semantic errors are detected. regards, tom lane