Add second test that tests multiple --schema args

This commit is contained in:
Steeve Lennmark 2014-01-30 12:27:32 +00:00
parent e7b6719256
commit 9b381f5b85
2 changed files with 29 additions and 10 deletions

View File

@ -355,9 +355,20 @@ INFO: repacking table "trg4"
--
-- Repack single schema
--
CREATE SCHEMA only_this_schema;
CREATE TABLE only_this_schema.tbl1 (id INTEGER PRIMARY KEY);
CREATE TABLE only_this_schema.tbl2 (id INTEGER PRIMARY KEY);
\! pg_repack --dbname=contrib_regression --schema=only_this_schema
INFO: repacking table "only_this_schema.tbl1"
INFO: repacking table "only_this_schema.tbl2"
CREATE SCHEMA test_schema1;
CREATE TABLE test_schema1.tbl1 (id INTEGER PRIMARY KEY);
CREATE TABLE test_schema1.tbl2 (id INTEGER PRIMARY KEY);
\! pg_repack --dbname=contrib_regression --schema=test_schema1
INFO: repacking table "test_schema1.tbl1"
INFO: repacking table "test_schema1.tbl2"
--
-- Repack two schemas
--
CREATE SCHEMA test_schema2;
CREATE TABLE test_schema2.tbl1 (id INTEGER PRIMARY KEY);
CREATE TABLE test_schema2.tbl2 (id INTEGER PRIMARY KEY);
\! pg_repack --dbname=contrib_regression --schema=test_schema1 --schema=test_schema2
INFO: repacking table "test_schema2.tbl1"
INFO: repacking table "test_schema1.tbl1"
INFO: repacking table "test_schema1.tbl2"
INFO: repacking table "test_schema2.tbl2"

View File

@ -210,7 +210,15 @@ CREATE TRIGGER zzzzzz AFTER UPDATE ON trg4 FOR EACH ROW EXECUTE PROCEDURE trgtes
--
-- Repack single schema
--
CREATE SCHEMA only_this_schema;
CREATE TABLE only_this_schema.tbl1 (id INTEGER PRIMARY KEY);
CREATE TABLE only_this_schema.tbl2 (id INTEGER PRIMARY KEY);
\! pg_repack --dbname=contrib_regression --schema=only_this_schema
CREATE SCHEMA test_schema1;
CREATE TABLE test_schema1.tbl1 (id INTEGER PRIMARY KEY);
CREATE TABLE test_schema1.tbl2 (id INTEGER PRIMARY KEY);
\! pg_repack --dbname=contrib_regression --schema=test_schema1
--
-- Repack two schemas
--
CREATE SCHEMA test_schema2;
CREATE TABLE test_schema2.tbl1 (id INTEGER PRIMARY KEY);
CREATE TABLE test_schema2.tbl2 (id INTEGER PRIMARY KEY);
\! pg_repack --dbname=contrib_regression --schema=test_schema1 --schema=test_schema2