Commit ae4e6887 authored by Simon Riggs's avatar Simon Riggs

Silence REINDEX

Previously REINDEX DATABASE and REINDEX SCHEMA
produced a stream of NOTICE messages. Removing that
since it is inconsistent for such a command to
produce output without a VERBOSE option.
parent 1135aaba
...@@ -1936,7 +1936,7 @@ ReindexObject(const char *objectName, ReindexObjectType objectKind) ...@@ -1936,7 +1936,7 @@ ReindexObject(const char *objectName, ReindexObjectType objectKind)
if (reindex_relation(relid, if (reindex_relation(relid,
REINDEX_REL_PROCESS_TOAST | REINDEX_REL_PROCESS_TOAST |
REINDEX_REL_CHECK_CONSTRAINTS)) REINDEX_REL_CHECK_CONSTRAINTS))
ereport(NOTICE, ereport(DEBUG1,
(errmsg("table \"%s.%s\" was reindexed", (errmsg("table \"%s.%s\" was reindexed",
get_namespace_name(get_rel_namespace(relid)), get_namespace_name(get_rel_namespace(relid)),
get_rel_name(relid)))); get_rel_name(relid))));
......
...@@ -2841,8 +2841,6 @@ CREATE TABLE schema_to_reindex.table1(col1 SERIAL PRIMARY KEY); ...@@ -2841,8 +2841,6 @@ CREATE TABLE schema_to_reindex.table1(col1 SERIAL PRIMARY KEY);
CREATE TABLE schema_to_reindex.table2(col1 SERIAL PRIMARY KEY, col2 VARCHAR(100) NOT NULL); CREATE TABLE schema_to_reindex.table2(col1 SERIAL PRIMARY KEY, col2 VARCHAR(100) NOT NULL);
CREATE INDEX ON schema_to_reindex.table2(col2); CREATE INDEX ON schema_to_reindex.table2(col2);
REINDEX SCHEMA schema_to_reindex; REINDEX SCHEMA schema_to_reindex;
NOTICE: table "schema_to_reindex.table1" was reindexed
NOTICE: table "schema_to_reindex.table2" was reindexed
BEGIN; BEGIN;
REINDEX SCHEMA schema_to_reindex; -- failure, cannot run in a transaction REINDEX SCHEMA schema_to_reindex; -- failure, cannot run in a transaction
ERROR: REINDEX SCHEMA cannot run inside a transaction block ERROR: REINDEX SCHEMA cannot run inside a transaction block
...@@ -2852,8 +2850,6 @@ CREATE ROLE reindexuser login; ...@@ -2852,8 +2850,6 @@ CREATE ROLE reindexuser login;
SET SESSION ROLE user_reindex; SET SESSION ROLE user_reindex;
ERROR: role "user_reindex" does not exist ERROR: role "user_reindex" does not exist
REINDEX SCHEMA schema_to_reindex; REINDEX SCHEMA schema_to_reindex;
NOTICE: table "schema_to_reindex.table1" was reindexed
NOTICE: table "schema_to_reindex.table2" was reindexed
-- Clean up -- Clean up
RESET ROLE; RESET ROLE;
DROP ROLE user_reindex; DROP ROLE user_reindex;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment