]> granicus.if.org Git - postgresql/commit
Allow ALTER TABLE .. SET NOT NULL to skip provably unnecessary scans.
authorRobert Haas <rhaas@postgresql.org>
Wed, 13 Mar 2019 12:55:00 +0000 (08:55 -0400)
committerRobert Haas <rhaas@postgresql.org>
Wed, 13 Mar 2019 12:55:00 +0000 (08:55 -0400)
commitbbb96c3704c041d139181c6601e5bc770e045d26
treecd03cd7963e96e06180a076a8a7c402484df47bc
parent95fa9f1a137fcb55ed418d8c91a315c7bb169979
Allow ALTER TABLE .. SET NOT NULL to skip provably unnecessary scans.

If existing CHECK or NOT NULL constraints preclude the presence
of nulls, we need not look to see whether any are present.

Sergei Kornilov, reviewed by Stephen Frost, Ildar Musin, David Rowley,
and by me.

Discussion: http://postgr.es/m/81911511895540@web58j.yandex.ru
doc/src/sgml/ref/alter_table.sgml
src/backend/commands/tablecmds.c
src/test/regress/expected/alter_table.out
src/test/regress/sql/alter_table.sql