Dropped unneeded test results variants

This commit is contained in:
Daniele Varrazzo
2017-03-29 04:43:19 +01:00
parent ecb07f1e3f
commit acb73b5a20
5 changed files with 65 additions and 1077 deletions

View File

@ -139,8 +139,8 @@ INFO: repacking table "tbl_idxopts"
time | timestamp without time zone |
,") | text | not null
Indexes:
"tbl_cluster_pkey" PRIMARY KEY, btree (","")", col1) WITH (fillfactor=75)
",") cluster" btree ("time", length(","")"), ","")" text_pattern_ops) WITH (fillfactor=75) CLUSTER
"tbl_cluster_pkey" PRIMARY KEY, btree (","")", col1) WITH (fillfactor='75')
",") cluster" btree ("time", length(","")"), ","")" text_pattern_ops) WITH (fillfactor='75') CLUSTER
\d tbl_gistkey
Table "public.tbl_gistkey"
@ -180,8 +180,8 @@ Table "public.tbl_with_dropped_column"
c2 | text |
c3 | text |
Indexes:
"tbl_with_dropped_column_pkey" PRIMARY KEY, btree (id) WITH (fillfactor=75) CLUSTER
"idx_c1c2" btree (c1, c2) WITH (fillfactor=75)
"tbl_with_dropped_column_pkey" PRIMARY KEY, btree (id) WITH (fillfactor='75') CLUSTER
"idx_c1c2" btree (c1, c2) WITH (fillfactor='75')
"idx_c2c1" btree (c2, c1)
\d tbl_with_dropped_toast
@ -325,7 +325,7 @@ INFO: repacking table "tbl_pk_uk"
-- => OK
\! pg_repack --dbname=contrib_regression --table=tbl_pk_uk --only-indexes
INFO: repacking indexes of "tbl_pk_uk"
INFO: repacking index "public"."tbl_pk_uk_col2_key"
INFO: repacking index "public"."tbl_pk_uk_col2_col1_key"
INFO: repacking index "public"."tbl_pk_uk_pkey"
-- => OK
\! pg_repack --dbname=contrib_regression --table=tbl_nn_puk
@ -338,25 +338,19 @@ CREATE FUNCTION trgtest() RETURNS trigger AS
$$BEGIN RETURN NEW; END$$
LANGUAGE plpgsql;
CREATE TABLE trg1 (id integer PRIMARY KEY);
CREATE TRIGGER z_repack_triggeq BEFORE UPDATE ON trg1 FOR EACH ROW EXECUTE PROCEDURE trgtest();
CREATE TRIGGER repack_trigger_1 AFTER UPDATE ON trg1 FOR EACH ROW EXECUTE PROCEDURE trgtest();
\! pg_repack --dbname=contrib_regression --table=trg1
INFO: repacking table "trg1"
CREATE TABLE trg2 (id integer PRIMARY KEY);
CREATE TRIGGER z_repack_trigger BEFORE UPDATE ON trg2 FOR EACH ROW EXECUTE PROCEDURE trgtest();
CREATE TRIGGER repack_trigger AFTER UPDATE ON trg2 FOR EACH ROW EXECUTE PROCEDURE trgtest();
\! pg_repack --dbname=contrib_regression --table=trg2
INFO: repacking table "trg2"
WARNING: the table "trg2" already has a trigger called "z_repack_trigger"
WARNING: the table "trg2" already has a trigger called "repack_trigger"
DETAIL: The trigger was probably installed during a previous attempt to run pg_repack on the table which was interrupted and for some reason failed to clean up the temporary objects. Please drop the trigger or drop and recreate the pg_repack extension altogether to remove all the temporary objects left over.
CREATE TABLE trg3 (id integer PRIMARY KEY);
CREATE TRIGGER z_repack_trigges BEFORE UPDATE ON trg3 FOR EACH ROW EXECUTE PROCEDURE trgtest();
CREATE TRIGGER repack_trigger_1 BEFORE UPDATE ON trg3 FOR EACH ROW EXECUTE PROCEDURE trgtest();
\! pg_repack --dbname=contrib_regression --table=trg3
INFO: repacking table "trg3"
WARNING: trigger "z_repack_trigges" conflicting on table "trg3"
DETAIL: The trigger "z_repack_trigger" must be the last of the BEFORE triggers to fire on the table (triggers fire in alphabetical order). Please rename the trigger so that it sorts before "z_repack_trigger": you can use "ALTER TRIGGER z_repack_trigges ON trg3 RENAME TO newname".
CREATE TABLE trg4 (id integer PRIMARY KEY);
CREATE TRIGGER zzzzzz AFTER UPDATE ON trg4 FOR EACH ROW EXECUTE PROCEDURE trgtest();
\! pg_repack --dbname=contrib_regression --table=trg4
INFO: repacking table "trg4"
--
-- Dry run
--
@ -387,3 +381,43 @@ ERROR: cannot repack specific table(s) in schema, use schema.table notation inst
-- => ERROR
\! pg_repack --dbname=contrib_regression --all --schema=test_schema1
ERROR: cannot repack specific schema(s) in all databases
--
-- don't kill backend
--
\! pg_repack --dbname=contrib_regression --table=tbl_cluster --no-kill-backend
INFO: repacking table "tbl_cluster"
--
-- no superuser check
--
DROP ROLE IF EXISTS nosuper;
CREATE ROLE nosuper WITH LOGIN;
-- => OK
\! pg_repack --dbname=contrib_regression --table=tbl_cluster --no-superuser-check
INFO: repacking table "tbl_cluster"
-- => ERROR
\! pg_repack --dbname=contrib_regression --table=tbl_cluster --username=nosuper
ERROR: pg_repack failed with error: You must be a superuser to use pg_repack
-- => ERROR
\! pg_repack --dbname=contrib_regression --table=tbl_cluster --username=nosuper --no-superuser-check
ERROR: pg_repack failed with error: ERROR: permission denied for schema repack
DROP ROLE IF EXISTS nosuper;
--
-- exclude extension check
--
CREATE SCHEMA exclude_extension_schema;
CREATE TABLE exclude_extension_schema.tbl(val integer primary key);
-- => ERROR
\! pg_repack --dbname=contrib_regression --table=dummy_table --exclude-extension=dummy_extension
ERROR: cannot specify --table (-t) and --exclude-extension (-C)
-- => ERROR
\! pg_repack --dbname=contrib_regression --table=dummy_table --exclude-extension=dummy_extension -x
ERROR: cannot specify --only-indexes (-x) and --exclude-extension (-C)
-- => ERROR
\! pg_repack --dbname=contrib_regression --index=dummy_index --exclude-extension=dummy_extension
ERROR: cannot specify --index (-i) and --exclude-extension (-C)
-- => OK
\! pg_repack --dbname=contrib_regression --schema=exclude_extension_schema --exclude-extension=dummy_extension
INFO: repacking table "exclude_extension_schema.tbl"
-- => OK
\! pg_repack --dbname=contrib_regression --schema=exclude_extension_schema --exclude-extension=dummy_extension --exclude-extension=dummy_extension
INFO: repacking table "exclude_extension_schema.tbl"