pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alexander Lakhin <exclusion@gmail.com>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Dean Rasheed <dean.a.rasheed@gmail.com>
Cc: Peter Eisentraut <peter@eisentraut.org>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: cataloguing NOT NULL constraints
Date: Fri, 2 Feb 2024 19:00:01 +0300
Message-ID: <045dec3f-9b3d-aa44-0c99-85f6992306c7@gmail.com> (raw)
In-Reply-To: <202311081753.paidc6czdtmr@alvherre.pgsql>
References: <202311081753.paidc6czdtmr@alvherre.pgsql>

Hello Alvaro,

Please look at an anomaly introduced with b0e96f311.
The following script:
CREATE TABLE a ();
CREATE TABLE b (i int) INHERITS (a);
CREATE TABLE c () INHERITS (a, b);

ALTER TABLE a ADD COLUMN i int NOT NULL;

results in:
NOTICE:  merging definition of column "i" for child "b"
NOTICE:  merging definition of column "i" for child "c"
ERROR:  tuple already updated by self

(This is similar to bug #18297, but ATExecAddColumn() isn't guilty in this
case.)

Best regards,
Alexander





view thread (196+ messages)  latest in thread

Message-ID: <045dec3f-9b3d-aa44-0c99-85f6992306c7@gmail.com>
Permalink:  ../045dec3f-9b3d-aa44-0c99-85f6992306c7@gmail.com/
Also on:    postgresql.org/message-id/045dec3f-9b3d-aa44-0c99-85f6992306c7@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: exclusion@gmail.com, alvherre@alvh.no-ip.org, dean.a.rasheed@gmail.com, peter@eisentraut.org, robertmhaas@gmail.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: cataloguing NOT NULL constraints
  In-Reply-To: <045dec3f-9b3d-aa44-0c99-85f6992306c7@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox