Re: Strange presentaion related to inheritance in \d+

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Strange presentaion related to inheritance in \d+
Date: 2023-08-29 17:28:28
Message-ID: 20230829172828.5qi2pfbladvfgvsg@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2023-Aug-29, Kyotaro Horiguchi wrote:

> Attached is the initial version of the patch. It prevents "CREATE
> TABLE" from executing if there is an inconsisntent not-null
> constraint. Also I noticed that "ALTER TABLE t ADD NOT NULL c NO
> INHERIT" silently ignores the "NO INHERIT" part and fixed it.

Great, thank you. I pushed it after modifying it a bit -- instead of
throwing the error in MergeAttributes, I did it in
AddRelationNotNullConstraints(). It seems cleaner this way, mostly
because we already have to match these two constraints there. (I guess
you could argue that we waste catalog-insertion work before the error is
reported and the whole thing is aborted; but I don't think this is a
serious problem in practice.)

--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
"En las profundidades de nuestro inconsciente hay una obsesiva necesidad
de un universo lógico y coherente. Pero el universo real se halla siempre
un paso más allá de la lógica" (Irulan)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2023-08-29 17:45:21 Re: tablecmds.c/MergeAttributes() cleanup
Previous Message Pavel Stehule 2023-08-29 16:55:05 Re: broken master regress tests