An example in UPDATE documentation page is a bit outdated

From: PG Doc comments form <noreply(at)postgresql(dot)org>
To: pgsql-docs(at)lists(dot)postgresql(dot)org
Cc: emorgunov(at)mail(dot)ru
Subject: An example in UPDATE documentation page is a bit outdated
Date: 2026-03-07 11:54:44
Message-ID: 177288448489.777.2795338816825861811@wrigleys.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-docs

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 = stock + 24 WHERE winename = 'Chateau Lafite 2003';
-- continue with other operations, and eventually
COMMIT;

Now we can use INSERT ... ON CONFLICT DO UPDATE command in this case.

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message David G. Johnston 2026-03-07 20:45:19 Re: An example in UPDATE documentation page is a bit outdated
Previous Message Andrew Jackson 2026-03-03 14:56:46 Re: Add Restart=on-failure To Example Systemd File