Re: Can't find not null constraint, but \d+ shows that

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Tender Wang <tndrwang(at)gmail(dot)com>
Cc: jian he <jian(dot)universality(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Can't find not null constraint, but \d+ shows that
Date: 2024-03-28 09:18:38
Message-ID: 202403280918.7jasjav4emkt@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2024-Mar-28, Tender Wang wrote:

> RemoveConstraintById() should think recurse(e.g. partition table)? I'm not
> sure now.
> If we should think process recurse in RemoveConstraintById(), the
> function will look complicated than before.

No -- this function handles just a single constraint, as identified by
OID. The recursion is handled by upper layers, which can be either
dependency.c or tablecmds.c. I think the problem you found is caused by
the fact that I worked with the tablecmds.c recursion and neglected the
one in dependency.c.

--
Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/
"No nos atrevemos a muchas cosas porque son difíciles,
pero son difíciles porque no nos atrevemos a hacerlas" (Séneca)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jelte Fennema-Nio 2024-03-28 09:24:34 Re: Possibility to disable `ALTER SYSTEM`
Previous Message John Naylor 2024-03-28 09:15:28 Re: [PoC] Improve dead tuple storage for lazy vacuum