Re: Can't find not null constraint, but \d+ shows that
Alvaro Herrera <alvherre@alvh.no-ip.org>
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Tender Wang <tndrwang@gmail.com>
Cc: jian he <jian.universality@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2024-04-09T17:29:03Z
Lists: pgsql-hackers
Attachments
On 2024-Mar-29, Tender Wang wrote: > I think aboved case can explain what's meaning about comments in > dropconstraint_internal. > But here, in RemoveConstraintById() , we only care about primary key case, > so NOT NULL is better to removed from comments. Actually, I think it's better if all the resets of attnotnull occur in RemoveConstraintById, for both types of constraints; we would keep that block in dropconstraint_internal only to raise errors in the cases where the constraint is protecting a replica identity or a generated column. Something like the attached, perhaps, may need more polish. I'm not really sure about the business of adding a new pass value -- it's clear that things don't work if we don't do *something* -- I'm just not sure if this is the something that we want to do. -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ "Tiene valor aquel que admite que es un cobarde" (Fernandel)
Commits
-
Better handle indirect constraint drops
- 0cd711271d42 17.0 landed
-
Add macros for looping through a List without a ListCell.
- 14dd0f27d7cd 17.0 cited