summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorFujii Masao2015-05-15 11:09:57 +0000
committerFujii Masao2015-05-15 11:09:57 +0000
commitecd222e770d352121590363ffdf981147a43e976 (patch)
tree9fa6f9d3ad7002f5d8ced9948d49b72206bad713 /src/test
parent4b8f797f672bef07b4e87b4650b4035731b61d84 (diff)
Support VERBOSE option in REINDEX command.
When this option is specified, a progress report is printed as each index is reindexed. Per discussion, we agreed on the following syntax for the extensibility of the options. REINDEX (flexible options) { INDEX | ... } name Sawada Masahiko. Reviewed by Robert Haas, Fabrízio Mello, Alvaro Herrera, Kyotaro Horiguchi, Jim Nasby and me. Discussion: CAD21AoA0pK3YcOZAFzMae+2fcc3oGp5zoRggDyMNg5zoaWDhdQ@mail.gmail.com
Diffstat (limited to 'src/test')
-rw-r--r--src/test/regress/expected/create_index.out8
-rw-r--r--src/test/regress/sql/create_index.sql8
2 files changed, 16 insertions, 0 deletions
diff --git a/src/test/regress/expected/create_index.out b/src/test/regress/expected/create_index.out
index abe64e597c7..a98b10520d5 100644
--- a/src/test/regress/expected/create_index.out
+++ b/src/test/regress/expected/create_index.out
@@ -2832,6 +2832,14 @@ explain (costs off)
(2 rows)
--
+-- REINDEX (VERBOSE)
+--
+CREATE TABLE reindex_verbose(id integer primary key);
+\set VERBOSITY terse
+REINDEX (VERBOSE) TABLE reindex_verbose;
+INFO: index "reindex_verbose_pkey" was reindexed
+DROP TABLE reindex_verbose;
+--
-- REINDEX SCHEMA
--
REINDEX SCHEMA schema_to_reindex; -- failure, schema does not exist
diff --git a/src/test/regress/sql/create_index.sql b/src/test/regress/sql/create_index.sql
index f779fa0de17..6333a30bf6d 100644
--- a/src/test/regress/sql/create_index.sql
+++ b/src/test/regress/sql/create_index.sql
@@ -966,6 +966,14 @@ explain (costs off)
select * from tenk1 where (thousand, tenthous) in ((1,1001), (null,null));
--
+-- REINDEX (VERBOSE)
+--
+CREATE TABLE reindex_verbose(id integer primary key);
+\set VERBOSITY terse
+REINDEX (VERBOSE) TABLE reindex_verbose;
+DROP TABLE reindex_verbose;
+
+--
-- REINDEX SCHEMA
--
REINDEX SCHEMA schema_to_reindex; -- failure, schema does not exist