Re: unique constraint violation on multiple-rows update

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: unique constraint violation on multiple-rows update
Date: 2026-04-19 13:54:02
Message-ID: CAKFQuwZp1Qcdg9G_HEwDjNvvbHtZxU1Sz7xkJCm+G+psqwpO3Q@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, Apr 19, 2026 at 6:44 AM Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net>
wrote:

> > Running that does violate the (non-deferred) UNIQUE
> > constraint on the table column, however.
>

You know about deferred constraints, you should use them here. This is one
of the key use cases motivating their existence.

David J.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Karsten Hilbert 2026-04-19 14:09:18 Re: unique constraint violation on multiple-rows update
Previous Message Saulo José Benvenutti 2026-04-19 13:46:30 ANN: storage_engine 1.0.7 – columnar + row-compressed Table Access Methods for PostgreSQL 16-18