Re: Can't find not null constraint, but \d+ shows that - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Can't find not null constraint, but \d+ shows that
Date
Msg-id 202404091729.dls2prtnde6e@alvherre.pgsql
Whole thread Raw
In response to Re: Can't find not null constraint, but \d+ shows that  (Tender Wang <tndrwang@gmail.com>)
Responses Re: Can't find not null constraint, but \d+ shows that
List pgsql-hackers
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)

Attachment

pgsql-hackers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Re: IPC::Run::time[r|out] vs our TAP tests
Next
From: Robert Haas
Date:
Subject: [MASSMAIL]macOS Ventura won't generate core dumps