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 1sasxt-00Bnbd-He for pgsql-docs@arkaria.postgresql.org; Mon, 05 Aug 2024 08:21:13 +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 1sasxq-00CD5Q-Nv for pgsql-docs@arkaria.postgresql.org; Mon, 05 Aug 2024 08:21:10 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sasxq-00CD5H-AI for pgsql-docs@lists.postgresql.org; Mon, 05 Aug 2024 08:21:10 +0000 Received: from forward501b.mail.yandex.net ([2a02:6b8:c02:900:1:45:d181:d501]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sasxk-003Get-FI for pgsql-docs@lists.postgresql.org; Mon, 05 Aug 2024 08:21:09 +0000 Received: from mail-nwsmtp-smtp-production-main-19.sas.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-19.sas.yp-c.yandex.net [IPv6:2a02:6b8:c24:3b2:0:640:ff71:0]) by forward501b.mail.yandex.net (Yandex) with ESMTPS id 830F2610C1; Mon, 5 Aug 2024 11:21:00 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-19.sas.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id xKWcNcFIja60-XgxafogM; Mon, 05 Aug 2024 11:21:00 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ya.ru; s=mail; t=1722846060; bh=MOpD98llgL8cOeaR+QHXwnpWZhKySa9FLK+mjla7T5c=; h=From:In-Reply-To:Cc:Date:References:To:Subject:Message-ID; b=iRbTtJ7waGPerxsdsF/IE3aeBDsaJXcmYV6veihRCvBjjGSxUY/sIFZ1DFSpHP/dT aQwZLolKYobWl6zafwC9WfHVnvmSRUhWD6MCGrc6mXhQJKUZkTZGaCz9EblmWTLb5M 7JktjYsI4jeYp9rvHx2+9eyUGgAuKPgN5nANGlt0= Authentication-Results: mail-nwsmtp-smtp-production-main-19.sas.yp-c.yandex.net; dkim=pass header.i=@ya.ru Message-ID: <1af26a1b-9b82-4f89-a5e1-eb86e5330c3d@ya.ru> Date: Mon, 5 Aug 2024 11:20:58 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Savepoints in plpgsql To: Tom Lane , "David G. Johnston" Cc: "pgsql-docs@lists.postgresql.org" References: <172076354433.736586.14347210271966220018@wrigleys.postgresql.org> <2320320.1720791744@sss.pgh.pa.us> Content-Language: ru From: =?UTF-8?B?0J7Qu9C10LMg0KHQsNC80L7QudC70L7Qsg==?= In-Reply-To: <2320320.1720791744@sss.pgh.pa.us> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 12.07.2024 16:42, Tom Lane wrote: > > PL/pgSQL does not support savepoints (SAVEPOINT/ROLLBACK TO > SAVEPOINT/RELEASE SAVEPOINT commands). Typical usage patterns > for savepoints can be replaced by blocks with exception handlers > (see 43.6.8). Under the hood, a block with exception handlers > forms a subtransaction, which means that transactions cannot > be ended inside such a block. > > regards, tom lane Yes, this will be fine. -- Олег