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 1qdBPQ-002TMU-PW for pgsql-general@arkaria.postgresql.org; Mon, 04 Sep 2023 15:22:37 +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 1qdBPP-00CS0I-J1 for pgsql-general@arkaria.postgresql.org; Mon, 04 Sep 2023 15:22:35 +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 1qdBPO-00CRzr-T4 for pgsql-general@lists.postgresql.org; Mon, 04 Sep 2023 15:22:34 +0000 Received: from mout-u-204.mailbox.org ([2001:67c:2050:101:465::204]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qdBPK-002hcR-Rd for pgsql-general@lists.postgresql.org; Mon, 04 Sep 2023 15:22:33 +0000 Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:b231:465::102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-u-204.mailbox.org (Postfix) with ESMTPS id 4RfXSJ00WVz9sSx; Mon, 4 Sep 2023 17:22:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ewie.name; s=MBO0001; t=1693840944; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kn3wLgzicexS4nzKbSmZ5LhK1AaImkaqVr7axaSwdXI=; b=aTGEMW+KX0CcNKbS4cVGxSCZx0UZvymm4EHtgco3XybCgdsQISClQ5bzsyEjGgp6VKivq7 fpP8xXeumiI1thEv1+Fq1Jy4nSLtXmL9KJLhraL2GmAxEkqujz3v2CK13lduun2akDID7S 3H/4CjjI2gi9W/Een1tOOKRTN2IHyGH+yxtbPzPDFvllsjXr2VA011ZZAyxwH1JUR/wJVB +ry4DstwrBgi2qxnnvNzl+nN4qXHeWRCBKMmajKOyhTngqkQzcr3ocnJKb7h9JV6HUdGrZ VS78uupzdRej4RMwnJ6Gg6Jv+v8qjgEk1F4H9eX0zUZ4zVFJtsIAWSEYlywXFw== Date: Mon, 4 Sep 2023 17:22:23 +0200 (CEST) From: Erik Wienhold To: "David G. Johnston" Cc: "pgsql-general@lists.postgresql.org" Message-ID: <1165806895.176202.1693840943412@office.mailbox.org> In-Reply-To: References: <1341766181.156278.1693831501720@office.mailbox.org> Subject: Re: rollback to savepoint issue MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Priority: 3 Importance: Normal X-Rspamd-Queue-Id: 4RfXSJ00WVz9sSx List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 04/09/2023 16:56 CEST David G. Johnston wro= te: > On Monday, September 4, 2023, Erik Wienhold wrote: > > > On 04/09/2023 11:51 CEST Lorusso Domenico wrot= e: > > > > > The original=C2=A0code in embedded in a function, but the problem is= the same: > > > > Transaction control is not possible in functions. Only in procedures (= CALL) > > and DO blocks. > > Then explain why the original savepoint command wasn=E2=80=99t a syntax, = or runtime, > error? I don't need to because CREATE {FUNCTION | PROCEDURE} already fails because= of ROLLBACK TO SAVEPOINT. And without a function to execute there can't be an= y runtime error because of SAVEPOINT. My point was about transaction control= in plpgsql in general. > Plus, the error is syntax, usually when you try something that exists > but is disallowed the system gives you some kind of invalid state excepti= on > at runtime, -- Erik