Skip to content

Commit 9b381f5

Browse files
committed
Add second test that tests multiple --schema args
1 parent e7b6719 commit 9b381f5

File tree

2 files changed

+29
-10
lines changed

2 files changed

+29
-10
lines changed

regress/expected/repack.out

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -355,9 +355,20 @@ INFO: repacking table "trg4"
355355
--
356356
-- Repack single schema
357357
--
358-
CREATE SCHEMA only_this_schema;
359-
CREATE TABLE only_this_schema.tbl1 (id INTEGER PRIMARY KEY);
360-
CREATE TABLE only_this_schema.tbl2 (id INTEGER PRIMARY KEY);
361-
\! pg_repack --dbname=contrib_regression --schema=only_this_schema
362-
INFO: repacking table "only_this_schema.tbl1"
363-
INFO: repacking table "only_this_schema.tbl2"
358+
CREATE SCHEMA test_schema1;
359+
CREATE TABLE test_schema1.tbl1 (id INTEGER PRIMARY KEY);
360+
CREATE TABLE test_schema1.tbl2 (id INTEGER PRIMARY KEY);
361+
\! pg_repack --dbname=contrib_regression --schema=test_schema1
362+
INFO: repacking table "test_schema1.tbl1"
363+
INFO: repacking table "test_schema1.tbl2"
364+
--
365+
-- Repack two schemas
366+
--
367+
CREATE SCHEMA test_schema2;
368+
CREATE TABLE test_schema2.tbl1 (id INTEGER PRIMARY KEY);
369+
CREATE TABLE test_schema2.tbl2 (id INTEGER PRIMARY KEY);
370+
\! pg_repack --dbname=contrib_regression --schema=test_schema1 --schema=test_schema2
371+
INFO: repacking table "test_schema2.tbl1"
372+
INFO: repacking table "test_schema1.tbl1"
373+
INFO: repacking table "test_schema1.tbl2"
374+
INFO: repacking table "test_schema2.tbl2"

regress/sql/repack.sql

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,15 @@ CREATE TRIGGER zzzzzz AFTER UPDATE ON trg4 FOR EACH ROW EXECUTE PROCEDURE trgtes
210210
--
211211
-- Repack single schema
212212
--
213-
CREATE SCHEMA only_this_schema;
214-
CREATE TABLE only_this_schema.tbl1 (id INTEGER PRIMARY KEY);
215-
CREATE TABLE only_this_schema.tbl2 (id INTEGER PRIMARY KEY);
216-
\! pg_repack --dbname=contrib_regression --schema=only_this_schema
213+
CREATE SCHEMA test_schema1;
214+
CREATE TABLE test_schema1.tbl1 (id INTEGER PRIMARY KEY);
215+
CREATE TABLE test_schema1.tbl2 (id INTEGER PRIMARY KEY);
216+
\! pg_repack --dbname=contrib_regression --schema=test_schema1
217+
218+
--
219+
-- Repack two schemas
220+
--
221+
CREATE SCHEMA test_schema2;
222+
CREATE TABLE test_schema2.tbl1 (id INTEGER PRIMARY KEY);
223+
CREATE TABLE test_schema2.tbl2 (id INTEGER PRIMARY KEY);
224+
\! pg_repack --dbname=contrib_regression --schema=test_schema1 --schema=test_schema2

0 commit comments

Comments
 (0)