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.96) (envelope-from ) id 1vyyQ3-000aNj-2D for pgsql-docs@arkaria.postgresql.org; Sat, 07 Mar 2026 20:38:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vyyQ2-009Zct-0Y for pgsql-docs@arkaria.postgresql.org; Sat, 07 Mar 2026 20:38:38 +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.96) (envelope-from ) id 1vyqFP-008Ylt-2D for pgsql-docs@lists.postgresql.org; Sat, 07 Mar 2026 11:55:08 +0000 Received: from mahout.postgresql.org ([2001:4800:3e1:1::227]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vyqFN-00000000zfh-3kLt for pgsql-docs@lists.postgresql.org; Sat, 07 Mar 2026 11:55:07 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=postgresql.org; s=20171124; h=Message-ID:Date:Reply-To:Cc:From:To:Subject: Content-Transfer-Encoding:MIME-Version:Content-Type:Sender:Content-ID: Content-Description:In-Reply-To:References; bh=vg0gncw5csLpcpVq2AvFvCrd8kTEQPFBWFU2UR2fDLY=; b=H2vlq/5aJIiFvkbvtSKT8j87mG XiirCQFC9cDsYzQ6A88dDop0SK2iPf0wyrO1vErmVG656edS1lZ59UACUuMNHNsSdOdtcca5dVv8s 3S8Fzvn7OaI3N7SFozvEOE2d3SmEGhy9HKnF6cbKNPORP0O1pYsyrsQukcpD+xXXwcjelkK22Kc+5 M64eV1O/5Gk99i7fI3Bw6Otg/gyoWZhKgI8lqvulRqxBwLN0d0sqfHKGzplsWRLCwFQnH31CjOdUb FbCEXIt/80y9iNxbe5XgxHM9ctFECUnEDgzCIJQRqYX9qqP0QPvyyUJeeQ3a6mhPf4IQH7PO1SIU1 IuRz0oFA==; Received: from wrigleys.postgresql.org ([2a02:16a8:dc51::60]) by mahout.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vyqFM-001x8B-2O for pgsql-docs@lists.postgresql.org; Sat, 07 Mar 2026 11:55:05 +0000 Received: from localhost ([127.0.0.1] helo=wrigleys.postgresql.org) by wrigleys.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vyqFK-004eYc-1W for pgsql-docs@lists.postgresql.org; Sat, 07 Mar 2026 11:55:03 +0000 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: An example in UPDATE documentation page is a bit outdated To: pgsql-docs@lists.postgresql.org From: PG Doc comments form Cc: emorgunov@mail.ru Reply-To: emorgunov@mail.ru, pgsql-docs@lists.postgresql.org Date: Sat, 07 Mar 2026 11:54:44 +0000 Message-ID: <177288448489.777.2795338816825861811@wrigleys.postgresql.org> X-Auto-Response-Suppress: All Auto-Submitted: auto-generated List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk The following documentation comment has been logged on the website: Page: https://www.postgresql.org/docs/18/sql-update.html Description: There is an example on UPDATE documentation page -- BEGIN; -- other operations SAVEPOINT sp1; INSERT INTO wines VALUES('Chateau Lafite 2003', '24'); -- Assume the above fails because of a unique key violation, -- so now we issue these commands: ROLLBACK TO sp1; UPDATE wines SET stock =3D stock + 24 WHERE winename =3D 'Chateau Lafite 20= 03'; -- continue with other operations, and eventually COMMIT; Now we can use INSERT ... ON CONFLICT DO UPDATE command in this case.