);
insert into domnotnull default values;
alter domain dnotnulltest set not null; -- fails
-ERROR: ALTER DOMAIN: Relation "domnotnull" Attribute "col1" contains NULL values
+ERROR: ALTER DOMAIN: Relation "domnotnull" attribute "col1" contains NULL values
update domnotnull set col1 = 5;
alter domain dnotnulltest set not null; -- fails
-ERROR: ALTER DOMAIN: Relation "domnotnull" Attribute "col2" contains NULL values
+ERROR: ALTER DOMAIN: Relation "domnotnull" attribute "col2" contains NULL values
update domnotnull set col2 = 6;
alter domain dnotnulltest set not null;
alter domain dnotnulltest set not null; -- fails
-ERROR: AlterDomain: dnotnulltest is already set to NOT NULL
+NOTICE: AlterDomain: dnotnulltest is already set to NOT NULL
update domnotnull set col1 = null; -- fails
ERROR: Domain dnotnulltest does not allow NULL values
alter domain dnotnulltest drop not null;
alter domain dnotnulltest drop not null; -- fails
-ERROR: AlterDomain: dnotnulltest is already set to NULL
+NOTICE: AlterDomain: dnotnulltest is already set to NULL
update domnotnull set col1 = null;
drop domain dnotnulltest cascade;
NOTICE: Drop cascades to table domnotnull column col2
insert into domcontest values (1);
insert into domcontest values (2);
alter domain con add constraint t check (VALUE < 1); -- fails
-ERROR: AlterDomainAddConstraint: Domain con constraint t failed
+ERROR: ALTER DOMAIN: Relation "domcontest" attribute "col1" contains values that fail the new constraint
alter domain con add constraint t check (VALUE < 34);
alter domain con add check (VALUE > 0);
insert into domcontest values (-5); -- fails