Skip to content

Commit a92fefa

Browse files
committed
Silence error message during test
It is different across server versions.
1 parent 95c196d commit a92fefa

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

bin/expected/repack.out

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,10 @@ INSERT INTO tbl_with_dropped_toast VALUES(2, 20, sqrt(2::numeric(1000,999))::tex
8282
ALTER TABLE tbl_with_dropped_toast DROP COLUMN t;
8383
INSERT INTO tbl_badindex VALUES(1, 10);
8484
INSERT INTO tbl_badindex VALUES(2, 10);
85+
-- This will fail. Silence the message as it's different across PG versions.
86+
SET client_min_messages = fatal;
8587
CREATE UNIQUE INDEX CONCURRENTLY idx_badindex_n ON tbl_badindex (n);
86-
ERROR: could not create unique index "idx_badindex_n"
87-
DETAIL: Key (n)=(10) is duplicated.
88+
SET client_min_messages = warning;
8889
INSERT INTO tbl_idxopts VALUES (0, 'abc'), (1, 'aaa'), (2, NULL), (3, 'bbb');
8990
--
9091
-- before

bin/sql/repack.sql

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,11 @@ ALTER TABLE tbl_with_dropped_toast DROP COLUMN t;
100100

101101
INSERT INTO tbl_badindex VALUES(1, 10);
102102
INSERT INTO tbl_badindex VALUES(2, 10);
103+
104+
-- This will fail. Silence the message as it's different across PG versions.
105+
SET client_min_messages = fatal;
103106
CREATE UNIQUE INDEX CONCURRENTLY idx_badindex_n ON tbl_badindex (n);
107+
SET client_min_messages = warning;
104108

105109
INSERT INTO tbl_idxopts VALUES (0, 'abc'), (1, 'aaa'), (2, NULL), (3, 'bbb');
106110

0 commit comments

Comments
 (0)