From 30e2c42e00a501278ffe80223bada52e2ba269f3 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 13 Nov 2007 06:29:04 +0000 Subject: [PATCH] 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. --- contrib/btree_gist/expected/init.out | 17 ++--------------- contrib/btree_gist/sql/init.sql | 2 ++ contrib/dblink/expected/dblink.out | 2 ++ contrib/dblink/sql/dblink.sql | 2 ++ contrib/ltree/expected/ltree.out | 18 ++++++------------ contrib/ltree/sql/ltree.sql | 6 ++++++ contrib/pg_trgm/expected/pg_trgm.out | 9 ++++++--- contrib/pg_trgm/sql/pg_trgm.sql | 6 ++++++ contrib/pgcrypto/expected/init.out | 6 ++++++ contrib/pgcrypto/sql/init.sql | 6 ++++++ contrib/tablefunc/expected/tablefunc.out | 2 ++ contrib/tablefunc/sql/tablefunc.sql | 2 ++ 12 files changed, 48 insertions(+), 30 deletions(-) diff --git a/contrib/btree_gist/expected/init.out b/contrib/btree_gist/expected/init.out index 1dbbfd74ec..c808249545 100644 --- a/contrib/btree_gist/expected/init.out +++ b/contrib/btree_gist/expected/init.out @@ -2,19 +2,6 @@ -- first, define the datatype. Turn off echoing so that expected file -- does not depend on contents of btree_gist.sql. -- +SET client_min_messages = warning; \set ECHO none -psql:btree_gist.sql:7: NOTICE: type "gbtreekey4" is not yet defined -DETAIL: Creating a shell type definition. -psql:btree_gist.sql:12: NOTICE: argument type gbtreekey4 is only a shell -psql:btree_gist.sql:23: NOTICE: type "gbtreekey8" is not yet defined -DETAIL: Creating a shell type definition. -psql:btree_gist.sql:28: NOTICE: argument type gbtreekey8 is only a shell -psql:btree_gist.sql:39: NOTICE: type "gbtreekey16" is not yet defined -DETAIL: Creating a shell type definition. -psql:btree_gist.sql:44: NOTICE: argument type gbtreekey16 is only a shell -psql:btree_gist.sql:55: NOTICE: type "gbtreekey32" is not yet defined -DETAIL: Creating a shell type definition. -psql:btree_gist.sql:60: NOTICE: argument type gbtreekey32 is only a shell -psql:btree_gist.sql:71: NOTICE: type "gbtreekey_var" is not yet defined -DETAIL: Creating a shell type definition. -psql:btree_gist.sql:76: NOTICE: argument type gbtreekey_var is only a shell +RESET client_min_messages; diff --git a/contrib/btree_gist/sql/init.sql b/contrib/btree_gist/sql/init.sql index 04fdc845f5..7fafde12d8 100644 --- a/contrib/btree_gist/sql/init.sql +++ b/contrib/btree_gist/sql/init.sql @@ -2,6 +2,8 @@ -- first, define the datatype. Turn off echoing so that expected file -- does not depend on contents of btree_gist.sql. -- +SET client_min_messages = warning; \set ECHO none \i btree_gist.sql \set ECHO all +RESET client_min_messages; diff --git a/contrib/dblink/expected/dblink.out b/contrib/dblink/expected/dblink.out index 966da0fd6e..bdd2f9926f 100644 --- a/contrib/dblink/expected/dblink.out +++ b/contrib/dblink/expected/dblink.out @@ -6,7 +6,9 @@ SET search_path = public; -- -- Turn off echoing so that expected file does not depend on -- contents of dblink.sql. +SET client_min_messages = warning; \set ECHO none +RESET client_min_messages; CREATE TABLE foo(f1 int, f2 text, f3 text[], primary key (f1,f2)); NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "foo_pkey" for table "foo" INSERT INTO foo VALUES (0,'a','{"a0","b0","c0"}'); diff --git a/contrib/dblink/sql/dblink.sql b/contrib/dblink/sql/dblink.sql index 52a3d049b9..277500e6f1 100644 --- a/contrib/dblink/sql/dblink.sql +++ b/contrib/dblink/sql/dblink.sql @@ -7,9 +7,11 @@ SET search_path = public; -- -- Turn off echoing so that expected file does not depend on -- contents of dblink.sql. +SET client_min_messages = warning; \set ECHO none \i dblink.sql \set ECHO all +RESET client_min_messages; CREATE TABLE foo(f1 int, f2 text, f3 text[], primary key (f1,f2)); INSERT INTO foo VALUES (0,'a','{"a0","b0","c0"}'); diff --git a/contrib/ltree/expected/ltree.out b/contrib/ltree/expected/ltree.out index 96a1876bfc..7f61e569cf 100644 --- a/contrib/ltree/expected/ltree.out +++ b/contrib/ltree/expected/ltree.out @@ -1,16 +1,10 @@ +-- +-- first, define the datatype. Turn off echoing so that expected file +-- does not depend on contents of ltree.sql. +-- +SET client_min_messages = warning; \set ECHO none -psql:ltree.sql:9: NOTICE: type "ltree" is not yet defined -DETAIL: Creating a shell type definition. -psql:ltree.sql:14: NOTICE: argument type ltree is only a shell -psql:ltree.sql:306: NOTICE: type "lquery" is not yet defined -DETAIL: Creating a shell type definition. -psql:ltree.sql:311: NOTICE: argument type lquery is only a shell -psql:ltree.sql:417: NOTICE: type "ltxtquery" is not yet defined -DETAIL: Creating a shell type definition. -psql:ltree.sql:422: NOTICE: argument type ltxtquery is only a shell -psql:ltree.sql:484: NOTICE: type "ltree_gist" is not yet defined -DETAIL: Creating a shell type definition. -psql:ltree.sql:489: NOTICE: argument type ltree_gist is only a shell +RESET client_min_messages; SELECT ''::ltree; ltree ------- diff --git a/contrib/ltree/sql/ltree.sql b/contrib/ltree/sql/ltree.sql index 3a155ea22b..9241c2a0cb 100644 --- a/contrib/ltree/sql/ltree.sql +++ b/contrib/ltree/sql/ltree.sql @@ -1,6 +1,12 @@ +-- +-- first, define the datatype. Turn off echoing so that expected file +-- does not depend on contents of ltree.sql. +-- +SET client_min_messages = warning; \set ECHO none \i ltree.sql \set ECHO all +RESET client_min_messages; SELECT ''::ltree; SELECT '1'::ltree; diff --git a/contrib/pg_trgm/expected/pg_trgm.out b/contrib/pg_trgm/expected/pg_trgm.out index 3633b25ebc..9838534729 100644 --- a/contrib/pg_trgm/expected/pg_trgm.out +++ b/contrib/pg_trgm/expected/pg_trgm.out @@ -1,7 +1,10 @@ +-- +-- first, define the datatype. Turn off echoing so that expected file +-- does not depend on contents of pg_tgrm.sql. +-- +SET client_min_messages = warning; \set ECHO none -psql:pg_trgm.sql:44: NOTICE: type "gtrgm" is not yet defined -DETAIL: Creating a shell type definition. -psql:pg_trgm.sql:49: NOTICE: argument type gtrgm is only a shell +RESET client_min_messages; select show_trgm(''); show_trgm ----------- diff --git a/contrib/pg_trgm/sql/pg_trgm.sql b/contrib/pg_trgm/sql/pg_trgm.sql index 018ad85872..13045827ac 100644 --- a/contrib/pg_trgm/sql/pg_trgm.sql +++ b/contrib/pg_trgm/sql/pg_trgm.sql @@ -1,6 +1,12 @@ +-- +-- first, define the datatype. Turn off echoing so that expected file +-- does not depend on contents of pg_tgrm.sql. +-- +SET client_min_messages = warning; \set ECHO none \i pg_trgm.sql \set ECHO all +RESET client_min_messages; select show_trgm(''); select show_trgm('(*&^$@%@'); diff --git a/contrib/pgcrypto/expected/init.out b/contrib/pgcrypto/expected/init.out index 3252d4276e..6a5710d5a1 100644 --- a/contrib/pgcrypto/expected/init.out +++ b/contrib/pgcrypto/expected/init.out @@ -1,7 +1,13 @@ -- -- init pgcrypto -- +-- +-- first, define the functions. Turn off echoing so that expected file +-- does not depend on contents of pgcrypto.sql. +-- +SET client_min_messages = warning; \set ECHO none +RESET client_min_messages; -- check for encoding fn's SELECT encode('foo', 'hex'); encode diff --git a/contrib/pgcrypto/sql/init.sql b/contrib/pgcrypto/sql/init.sql index e536e67ea3..a58b3f0144 100644 --- a/contrib/pgcrypto/sql/init.sql +++ b/contrib/pgcrypto/sql/init.sql @@ -2,9 +2,15 @@ -- init pgcrypto -- +-- +-- first, define the functions. Turn off echoing so that expected file +-- does not depend on contents of pgcrypto.sql. +-- +SET client_min_messages = warning; \set ECHO none \i pgcrypto.sql \set ECHO all +RESET client_min_messages; -- check for encoding fn's SELECT encode('foo', 'hex'); diff --git a/contrib/tablefunc/expected/tablefunc.out b/contrib/tablefunc/expected/tablefunc.out index 9a0f3835d4..15ef758ed7 100644 --- a/contrib/tablefunc/expected/tablefunc.out +++ b/contrib/tablefunc/expected/tablefunc.out @@ -2,7 +2,9 @@ -- first, define the functions. Turn off echoing so that expected file -- does not depend on contents of tablefunc.sql. -- +SET client_min_messages = warning; \set ECHO none +RESET client_min_messages; -- -- normal_rand() -- no easy way to do this for regression testing diff --git a/contrib/tablefunc/sql/tablefunc.sql b/contrib/tablefunc/sql/tablefunc.sql index 815ef3e86b..9f559b3977 100644 --- a/contrib/tablefunc/sql/tablefunc.sql +++ b/contrib/tablefunc/sql/tablefunc.sql @@ -2,9 +2,11 @@ -- first, define the functions. Turn off echoing so that expected file -- does not depend on contents of tablefunc.sql. -- +SET client_min_messages = warning; \set ECHO none \i tablefunc.sql \set ECHO all +RESET client_min_messages; -- -- normal_rand()