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

From Alvaro Herrera
Subject Re: Assert failure in ATPrepAddPrimaryKey
Date
Msg-id 20230901114800.3yt3oytgzlhtyw3h@alvherre.pgsql
Whole thread Raw
In response to Assert failure in ATPrepAddPrimaryKey  (Richard Guo <guofenglinux@gmail.com>)
Responses Re: Assert failure in ATPrepAddPrimaryKey
List pgsql-hackers
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 reporting.

-- 
Álvaro Herrera               48°01'N 7°57'E  —  https://www.EnterpriseDB.com/
"XML!" Exclaimed C++.  "What are you doing here? You're not a programming
language."
"Tell that to the people who use me," said XML.
https://burningbird.net/the-parable-of-the-languages/

Attachment

pgsql-hackers by date:

Previous
From: John Naylor
Date:
Subject: Re: generate syscache info automatically
Next
From: Tom Lane
Date:
Subject: Re: Move bki file pre-processing from initdb to bootstrap