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.
This commit is contained in:
Tom Lane 2007-11-13 06:29:04 +00:00
parent 0614c5e5fd
commit 30e2c42e00
12 changed files with 48 additions and 30 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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"}');

View File

@ -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"}');

View File

@ -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
-------

View File

@ -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;

View File

@ -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
-----------

View File

@ -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('(*&^$@%@');

View File

@ -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

View File

@ -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');

View File

@ -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

View File

@ -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()