Re: BUG #18297: Error when adding a column to a parent table with complex inheritance

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Alexander Lakhin <exclusion@gmail.com>
Cc: Tender Wang <tndrwang@gmail.com>, Richard Guo <guofenglinux@gmail.com>, pgsql-bugs@lists.postgresql.org
Date: 2024-01-24T06:12:53Z
Lists: pgsql-bugs
On Thu, Jan 18, 2024 at 12:00:01PM +0300, Alexander Lakhin wrote:
> Thank you for working on this!

Yep, this one is obviously wrong so I have applied and backpatched the
fix for tablecmds.c.   

> (Maybe it's possible to slightly modify an existing hierarchy with tables
> a, b, c in inherit.sql for the purpose of the check added.)

I was wondering about that, but decided to keep a separate test as
suggested as the other tests with inheritance are already tightly
linked to their own assumptions, mostly with renames and constraints.
--
Michael

Commits

  1. Fix ALTER TABLE .. ADD COLUMN with complex inheritance trees