Assert failure in ATPrepAddPrimaryKey

From: Richard Guo <guofenglinux(at)gmail(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Subject: Assert failure in ATPrepAddPrimaryKey
Date: 2023-09-01 07:13:42
Message-ID: CAMbWs48bc-k_-1fh0dZpAhp_LiR5MfEX9haystmoBboR_4czCQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

The related codes are

foreach(lc, stmt->indexParams)
{
IndexElem *elem = lfirst_node(IndexElem, lc);
Constraint *nnconstr;

Assert(elem->expr == NULL);

It seems to be introduced by b0e96f3119.

Thanks
Richard

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2023-09-01 07:21:10 Re: [PoC] pg_upgrade: allow to upgrade publisher node
Previous Message Ashutosh Bapat 2023-09-01 06:58:43 Re: [17] CREATE SUBSCRIPTION ... SERVER