From a92fefab8a820c6b566bbf2e90c6d10d9c532552 Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Sun, 11 Nov 2012 23:38:38 +0000 Subject: [PATCH] Silence error message during test It is different across server versions. --- bin/expected/repack.out | 5 +++-- bin/sql/repack.sql | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/bin/expected/repack.out b/bin/expected/repack.out index 2fab3d7..96506c3 100644 --- a/bin/expected/repack.out +++ b/bin/expected/repack.out @@ -82,9 +82,10 @@ INSERT INTO tbl_with_dropped_toast VALUES(2, 20, sqrt(2::numeric(1000,999))::tex ALTER TABLE tbl_with_dropped_toast DROP COLUMN t; INSERT INTO tbl_badindex VALUES(1, 10); INSERT INTO tbl_badindex VALUES(2, 10); +-- This will fail. Silence the message as it's different across PG versions. +SET client_min_messages = fatal; CREATE UNIQUE INDEX CONCURRENTLY idx_badindex_n ON tbl_badindex (n); -ERROR: could not create unique index "idx_badindex_n" -DETAIL: Key (n)=(10) is duplicated. +SET client_min_messages = warning; INSERT INTO tbl_idxopts VALUES (0, 'abc'), (1, 'aaa'), (2, NULL), (3, 'bbb'); -- -- before diff --git a/bin/sql/repack.sql b/bin/sql/repack.sql index 732c573..3b9797d 100644 --- a/bin/sql/repack.sql +++ b/bin/sql/repack.sql @@ -100,7 +100,11 @@ ALTER TABLE tbl_with_dropped_toast DROP COLUMN t; INSERT INTO tbl_badindex VALUES(1, 10); INSERT INTO tbl_badindex VALUES(2, 10); + +-- This will fail. Silence the message as it's different across PG versions. +SET client_min_messages = fatal; CREATE UNIQUE INDEX CONCURRENTLY idx_badindex_n ON tbl_badindex (n); +SET client_min_messages = warning; INSERT INTO tbl_idxopts VALUES (0, 'abc'), (1, 'aaa'), (2, NULL), (3, 'bbb');