Attached is a rather hurried patch for Alexander Pravking's report that
ALTER TABLE fails to check pre-existing NOT NULL constraints properly:
http://archives.postgresql.org/pgsql-bugs/2006-07/msg00015.php
It seems to work but I'm out of time to do more with it, and am leaving
for Toronto in the morning. Anyone want to look it over, generate
back-patches as appropriate, and apply?
regards, tom lane