pgsql: Fix ALTER TABLE ADD COLUMN ... - Mailing list pgsql-committers

From tgl@postgresql.org (Tom Lane)
Subject pgsql: Fix ALTER TABLE ADD COLUMN ...
Date
Msg-id 20080424201759.482947559CC@cvs.postgresql.org
Whole thread Raw
List pgsql-committers
Log Message:
-----------
Fix ALTER TABLE ADD COLUMN ... PRIMARY KEY so that the new column is correctly
checked to see if it's been initialized to all non-nulls.  The implicit NOT
NULL constraint was not being checked during the ALTER (in fact, not even if
there was an explicit NOT NULL too), because ATExecAddColumn neglected to
set the flag needed to make the test happen.  This has been broken since
the capability was first added, in 8.0.

Brendan Jurd, per a report from Kaloyan Iliev.

Tags:
----
REL8_3_STABLE

Modified Files:
--------------
    pgsql/src/backend/commands:
        tablecmds.c (r1.242 -> r1.242.2.1)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/tablecmds.c?r1=1.242&r2=1.242.2.1)
    pgsql/src/test/regress/expected:
        alter_table.out (r1.104 -> r1.104.2.1)

(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/alter_table.out?r1=1.104&r2=1.104.2.1)
    pgsql/src/test/regress/sql:
        alter_table.sql (r1.56 -> r1.56.2.1)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/sql/alter_table.sql?r1=1.56&r2=1.56.2.1)

pgsql-committers by date:

Previous
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Fix ALTER TABLE ADD COLUMN ...
Next
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Fix ALTER TABLE ADD COLUMN ...