Anyway, in order to move this forward, here is an updated patch where the ADD CONSTRAINT ... NOT NULL behavior for domains matches the idempotent behavior of tables. This uses the patch that Jian He posted.
pgsql-hackers by date:
Соглашаюсь с условиями обработки персональных данных