Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 30e2c42

Browse files
committed
Fix a few contrib regression test scripts that hadn't gotten the word
about best practice for including the module creation scripts: to wit that you should suppress NOTICE messages. This avoids creating regression failures by adding or removing comment lines in the module scripts.
1 parent 0614c5e commit 30e2c42

File tree

12 files changed

+48
-30
lines changed

12 files changed

+48
-30
lines changed

contrib/btree_gist/expected/init.out

+2-15
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,6 @@
22
-- first, define the datatype. Turn off echoing so that expected file
33
-- does not depend on contents of btree_gist.sql.
44
--
5+
SET client_min_messages = warning;
56
\set ECHO none
6-
psql:btree_gist.sql:7: NOTICE: type "gbtreekey4" is not yet defined
7-
DETAIL: Creating a shell type definition.
8-
psql:btree_gist.sql:12: NOTICE: argument type gbtreekey4 is only a shell
9-
psql:btree_gist.sql:23: NOTICE: type "gbtreekey8" is not yet defined
10-
DETAIL: Creating a shell type definition.
11-
psql:btree_gist.sql:28: NOTICE: argument type gbtreekey8 is only a shell
12-
psql:btree_gist.sql:39: NOTICE: type "gbtreekey16" is not yet defined
13-
DETAIL: Creating a shell type definition.
14-
psql:btree_gist.sql:44: NOTICE: argument type gbtreekey16 is only a shell
15-
psql:btree_gist.sql:55: NOTICE: type "gbtreekey32" is not yet defined
16-
DETAIL: Creating a shell type definition.
17-
psql:btree_gist.sql:60: NOTICE: argument type gbtreekey32 is only a shell
18-
psql:btree_gist.sql:71: NOTICE: type "gbtreekey_var" is not yet defined
19-
DETAIL: Creating a shell type definition.
20-
psql:btree_gist.sql:76: NOTICE: argument type gbtreekey_var is only a shell
7+
RESET client_min_messages;

contrib/btree_gist/sql/init.sql

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
-- first, define the datatype. Turn off echoing so that expected file
33
-- does not depend on contents of btree_gist.sql.
44
--
5+
SET client_min_messages = warning;
56
\set ECHO none
67
\i btree_gist.sql
78
\set ECHO all
9+
RESET client_min_messages;

contrib/dblink/expected/dblink.out

+2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ SET search_path = public;
66
--
77
-- Turn off echoing so that expected file does not depend on
88
-- contents of dblink.sql.
9+
SET client_min_messages = warning;
910
\set ECHO none
11+
RESET client_min_messages;
1012
CREATE TABLE foo(f1 int, f2 text, f3 text[], primary key (f1,f2));
1113
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "foo_pkey" for table "foo"
1214
INSERT INTO foo VALUES (0,'a','{"a0","b0","c0"}');

contrib/dblink/sql/dblink.sql

+2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@ SET search_path = public;
77
--
88
-- Turn off echoing so that expected file does not depend on
99
-- contents of dblink.sql.
10+
SET client_min_messages = warning;
1011
\set ECHO none
1112
\i dblink.sql
1213
\set ECHO all
14+
RESET client_min_messages;
1315

1416
CREATE TABLE foo(f1 int, f2 text, f3 text[], primary key (f1,f2));
1517
INSERT INTO foo VALUES (0,'a','{"a0","b0","c0"}');

contrib/ltree/expected/ltree.out

+6-12
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
1+
--
2+
-- first, define the datatype. Turn off echoing so that expected file
3+
-- does not depend on contents of ltree.sql.
4+
--
5+
SET client_min_messages = warning;
16
\set ECHO none
2-
psql:ltree.sql:9: NOTICE: type "ltree" is not yet defined
3-
DETAIL: Creating a shell type definition.
4-
psql:ltree.sql:14: NOTICE: argument type ltree is only a shell
5-
psql:ltree.sql:306: NOTICE: type "lquery" is not yet defined
6-
DETAIL: Creating a shell type definition.
7-
psql:ltree.sql:311: NOTICE: argument type lquery is only a shell
8-
psql:ltree.sql:417: NOTICE: type "ltxtquery" is not yet defined
9-
DETAIL: Creating a shell type definition.
10-
psql:ltree.sql:422: NOTICE: argument type ltxtquery is only a shell
11-
psql:ltree.sql:484: NOTICE: type "ltree_gist" is not yet defined
12-
DETAIL: Creating a shell type definition.
13-
psql:ltree.sql:489: NOTICE: argument type ltree_gist is only a shell
7+
RESET client_min_messages;
148
SELECT ''::ltree;
159
ltree
1610
-------

contrib/ltree/sql/ltree.sql

+6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1+
--
2+
-- first, define the datatype. Turn off echoing so that expected file
3+
-- does not depend on contents of ltree.sql.
4+
--
5+
SET client_min_messages = warning;
16
\set ECHO none
27
\i ltree.sql
38
\set ECHO all
9+
RESET client_min_messages;
410

511
SELECT ''::ltree;
612
SELECT '1'::ltree;

contrib/pg_trgm/expected/pg_trgm.out

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1+
--
2+
-- first, define the datatype. Turn off echoing so that expected file
3+
-- does not depend on contents of pg_tgrm.sql.
4+
--
5+
SET client_min_messages = warning;
16
\set ECHO none
2-
psql:pg_trgm.sql:44: NOTICE: type "gtrgm" is not yet defined
3-
DETAIL: Creating a shell type definition.
4-
psql:pg_trgm.sql:49: NOTICE: argument type gtrgm is only a shell
7+
RESET client_min_messages;
58
select show_trgm('');
69
show_trgm
710
-----------

contrib/pg_trgm/sql/pg_trgm.sql

+6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1+
--
2+
-- first, define the datatype. Turn off echoing so that expected file
3+
-- does not depend on contents of pg_tgrm.sql.
4+
--
5+
SET client_min_messages = warning;
16
\set ECHO none
27
\i pg_trgm.sql
38
\set ECHO all
9+
RESET client_min_messages;
410

511
select show_trgm('');
612
select show_trgm('(*&^$@%@');

contrib/pgcrypto/expected/init.out

+6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
--
22
-- init pgcrypto
33
--
4+
--
5+
-- first, define the functions. Turn off echoing so that expected file
6+
-- does not depend on contents of pgcrypto.sql.
7+
--
8+
SET client_min_messages = warning;
49
\set ECHO none
10+
RESET client_min_messages;
511
-- check for encoding fn's
612
SELECT encode('foo', 'hex');
713
encode

contrib/pgcrypto/sql/init.sql

+6
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,15 @@
22
-- init pgcrypto
33
--
44

5+
--
6+
-- first, define the functions. Turn off echoing so that expected file
7+
-- does not depend on contents of pgcrypto.sql.
8+
--
9+
SET client_min_messages = warning;
510
\set ECHO none
611
\i pgcrypto.sql
712
\set ECHO all
13+
RESET client_min_messages;
814

915
-- check for encoding fn's
1016
SELECT encode('foo', 'hex');

contrib/tablefunc/expected/tablefunc.out

+2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
-- first, define the functions. Turn off echoing so that expected file
33
-- does not depend on contents of tablefunc.sql.
44
--
5+
SET client_min_messages = warning;
56
\set ECHO none
7+
RESET client_min_messages;
68
--
79
-- normal_rand()
810
-- no easy way to do this for regression testing

contrib/tablefunc/sql/tablefunc.sql

+2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
-- first, define the functions. Turn off echoing so that expected file
33
-- does not depend on contents of tablefunc.sql.
44
--
5+
SET client_min_messages = warning;
56
\set ECHO none
67
\i tablefunc.sql
78
\set ECHO all
9+
RESET client_min_messages;
810

911
--
1012
-- normal_rand()

0 commit comments

Comments
 (0)