Re: Support NOT VALID / VALIDATE constraint options for named NOT NULL constraints

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: jian he <jian(dot)universality(at)gmail(dot)com>, Rushabh Lathia <rushabh(dot)lathia(at)gmail(dot)com>, Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Support NOT VALID / VALIDATE constraint options for named NOT NULL constraints
Date: 2025-04-02 14:40:38
Message-ID: CA+TgmobacrNZkDchjrHtkgth4xjd=rDX04OPSWBHDhCQAtQ71g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Apr 2, 2025 at 5:17 AM Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote:
> I don't quite love this behavior, but since there have been no
> complaints, I suppose it's okay and we should just do the same for
> not-nulls.

I don't understand the issue. It seems like the pg_dump output shown
here would recreate the catalog state.

> FWIW the part that I think you're not right on, is that constraints on
> partitioned tables never have local definitions. Even if you start with
> a constraint defined locally in the partition, the ATTACH operation will
> change its conislocal flag to false. So you can never "drop" it from
> the partition. For regular inheritance, we don't flip the conislocal
> flag to false, but you're still prevented from "dropping" the constraint
> from the child while the inheritance relationship exists (i.e. you can
> never set conislocal=false in such a case).

Hmm. I think this is different from attislocal/attinhcount.

--
Robert Haas
EDB: http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jakub Wartak 2025-04-02 14:45:53 Re: Draft for basic NUMA observability
Previous Message Alena Rybakina 2025-04-02 14:33:43 Re: Replace IN VALUES with ANY in WHERE clauses during optimization