Allow ALTER TABLE .. SET NOT NULL to skip provably unnecessary scans.

Robert Haas <rhaas@postgresql.org>

Commit: bbb96c3704c041d139181c6601e5bc770e045d26
Author: Robert Haas <rhaas@postgresql.org>
Date: 2019-03-13T12:55:00Z
Releases: 12.0
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

Files

Documentation touched

Discussion