Re: BUG #19393: pg_upgrade fails with duplicate key violation when CHECK constraint named *_not_null exists

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: huseyin(dot)d3r(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #19393: pg_upgrade fails with duplicate key violation when CHECK constraint named *_not_null exists
Date: 2026-02-05 16:52:50
Message-ID: 61c535617992fff830961ecc09a9c20096bc1f36.camel@cybertec.at
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, 2026-02-05 at 15:58 +0100, I wrote:
> The bug is actually not in pg_upgrade, but in CREATE TABLE. The attached patch
> fixes the problem for me by avoiding given constraint names when generating
> the names for NOT NULL constraints.

... and here is v2, including a regression test.

Yours,
Laurenz Albe

Attachment Content-Type Size
v2-0001-Avoid-name-collision-with-NOT-NULL-constraints.patch text/x-patch 5.5 KB

In response to

Browse pgsql-bugs by date

  From Date Subject
Previous Message David G. Johnston 2026-02-05 15:31:40 Re: BUG #19394: error in ecpg