Re: Assert failure in ATPrepAddPrimaryKey - Mailing list pgsql-hackers

From Richard Guo
Subject Re: Assert failure in ATPrepAddPrimaryKey
Date
Msg-id CAMbWs4_ogrkohxhUcUmv3=FozkJe5k=jeXyNzqh51wLZh_Cd0Q@mail.gmail.com
Whole thread Raw
In response to Re: Assert failure in ATPrepAddPrimaryKey  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
List pgsql-hackers

On Fri, Sep 1, 2023 at 7:48 PM Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
On 2023-Sep-01, Richard Guo wrote:

> I ran into an Assert failure in ATPrepAddPrimaryKey() with the query
> below:
>
> CREATE TABLE t0(c0 boolean);
> CREATE TABLE t1() INHERITS(t0);
>
> # ALTER TABLE t0 ADD CONSTRAINT m EXCLUDE ((1) WITH =);
> server closed the connection unexpectedly

Ugh, right, I failed to make the new function do nothing for this case;
this had no coverage.  Fix attached, with some additional test cases
based on yours.

Thanks for the fix!

Thanks
Richard

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Avoid a possible null pointer (src/backend/utils/adt/pg_locale.c)
Next
From: Amit Kapila
Date:
Subject: Re: Impact of checkpointer during pg_upgrade