From 5655565c077c53b6e9b4b9bfcdf96439cf3af065 Mon Sep 17 00:00:00 2001 From: Robert Haas Date: Wed, 13 Mar 2019 13:14:42 -0400 Subject: [PATCH] Revert setting client_min_messages to 'debug1' in new tests. The buildfarm doesn't like this, because some buildfarm members have log_statement = 'all'. We could change the log level of the messages instead, but Tom doesn't like that. So let's do this instead, at least for now. Patch by Sergei Kornilov, applied here in reverse. Discussion: http://postgr.es/m/2123251552490241@myt6-fe24916a5562.qloud-c.yandex.net --- src/test/regress/expected/alter_table.out | 19 ------------------- src/test/regress/sql/alter_table.sql | 5 ----- 2 files changed, 24 deletions(-) diff --git a/src/test/regress/expected/alter_table.out b/src/test/regress/expected/alter_table.out index 14fd2c13c6..2a26aa3a89 100644 --- a/src/test/regress/expected/alter_table.out +++ b/src/test/regress/expected/alter_table.out @@ -1028,8 +1028,6 @@ insert into atacc1 (test2, test) values (1, NULL); ERROR: null value in column "test" violates not-null constraint DETAIL: Failing row contains (null, 1). drop table atacc1; --- we want check if not null was implied by constraint -set client_min_messages to 'debug1'; -- alter table / alter column [set/drop] not null tests -- try altering system catalogs, should fail alter table pg_class alter column relname drop not null; @@ -1045,19 +1043,15 @@ ERROR: relation "non_existent" does not exist -- test checking for null values and primary key create table atacc1 (test int not null); alter table atacc1 add constraint "atacc1_pkey" primary key (test); -DEBUG: ALTER TABLE / ADD PRIMARY KEY will create implicit index "atacc1_pkey" for table "atacc1" -DEBUG: building index "atacc1_pkey" on table "atacc1" serially alter table atacc1 alter column test drop not null; ERROR: column "test" is in a primary key alter table atacc1 drop constraint "atacc1_pkey"; alter table atacc1 alter column test drop not null; insert into atacc1 values (null); alter table atacc1 alter test set not null; -DEBUG: verifying table "atacc1" ERROR: column "test" contains null values delete from atacc1; alter table atacc1 alter test set not null; -DEBUG: verifying table "atacc1" -- try altering a non-existent column, should fail alter table atacc1 alter bar set not null; ERROR: column "bar" of relation "atacc1" does not exist @@ -1076,49 +1070,36 @@ create table atacc1 (test_a int, test_b int); insert into atacc1 values (null, 1); -- constraint not cover all values, should fail alter table atacc1 add constraint atacc1_constr_or check(test_a is not null or test_b < 10); -DEBUG: verifying table "atacc1" alter table atacc1 alter test_a set not null; -DEBUG: verifying table "atacc1" ERROR: column "test_a" contains null values alter table atacc1 drop constraint atacc1_constr_or; -- not valid constraint, should fail alter table atacc1 add constraint atacc1_constr_invalid check(test_a is not null) not valid; alter table atacc1 alter test_a set not null; -DEBUG: verifying table "atacc1" ERROR: column "test_a" contains null values alter table atacc1 drop constraint atacc1_constr_invalid; -- with valid constraint update atacc1 set test_a = 1; alter table atacc1 add constraint atacc1_constr_a_valid check(test_a is not null); -DEBUG: verifying table "atacc1" alter table atacc1 alter test_a set not null; -DEBUG: existing constraints on column "atacc1"."test_a" are sufficient to prove that it does not contain nulls delete from atacc1; insert into atacc1 values (2, null); alter table atacc1 alter test_a drop not null; -- test multiple set not null at same time -- test_a checked by atacc1_constr_a_valid, test_b should fail by table scan alter table atacc1 alter test_a set not null, alter test_b set not null; -DEBUG: existing constraints on column "atacc1"."test_a" are sufficient to prove that it does not contain nulls -DEBUG: verifying table "atacc1" ERROR: column "test_b" contains null values -- commands order has no importance alter table atacc1 alter test_b set not null, alter test_a set not null; -DEBUG: verifying table "atacc1" ERROR: column "test_b" contains null values -- valid one by table scan, one by check constraints update atacc1 set test_b = 1; alter table atacc1 alter test_b set not null, alter test_a set not null; -DEBUG: verifying table "atacc1" alter table atacc1 alter test_a drop not null, alter test_b drop not null; -- both column has check constraints alter table atacc1 add constraint atacc1_constr_b_valid check(test_b is not null); -DEBUG: verifying table "atacc1" alter table atacc1 alter test_b set not null, alter test_a set not null; -DEBUG: existing constraints on column "atacc1"."test_b" are sufficient to prove that it does not contain nulls -DEBUG: existing constraints on column "atacc1"."test_a" are sufficient to prove that it does not contain nulls drop table atacc1; -reset client_min_messages; -- test inheritance create table parent (a int); create table child (b varchar(255)) inherits (parent); diff --git a/src/test/regress/sql/alter_table.sql b/src/test/regress/sql/alter_table.sql index b8714e27d3..5bda7febde 100644 --- a/src/test/regress/sql/alter_table.sql +++ b/src/test/regress/sql/alter_table.sql @@ -776,9 +776,6 @@ insert into atacc1 (test2, test) values (2, 3); insert into atacc1 (test2, test) values (1, NULL); drop table atacc1; --- we want check if not null was implied by constraint -set client_min_messages to 'debug1'; - -- alter table / alter column [set/drop] not null tests -- try altering system catalogs, should fail alter table pg_class alter column relname drop not null; @@ -847,8 +844,6 @@ alter table atacc1 add constraint atacc1_constr_b_valid check(test_b is not null alter table atacc1 alter test_b set not null, alter test_a set not null; drop table atacc1; -reset client_min_messages; - -- test inheritance create table parent (a int); create table child (b varchar(255)) inherits (parent);