|
|
@ -372,7 +372,7 @@ DefineIndex(IndexStmt *stmt, |
|
|
|
else |
|
|
|
else |
|
|
|
ereport(ERROR, |
|
|
|
ereport(ERROR, |
|
|
|
(errcode(ERRCODE_WRONG_OBJECT_TYPE), |
|
|
|
(errcode(ERRCODE_WRONG_OBJECT_TYPE), |
|
|
|
errmsg("\"%s\" is not a table", |
|
|
|
errmsg("\"%s\" is not a table or materialized view", |
|
|
|
RelationGetRelationName(rel)))); |
|
|
|
RelationGetRelationName(rel)))); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -1834,8 +1834,8 @@ ReindexDatabase(const char *databaseName, bool do_system, bool do_user) |
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* Scan pg_class to build a list of the relations we need to reindex. |
|
|
|
* Scan pg_class to build a list of the relations we need to reindex. |
|
|
|
* |
|
|
|
* |
|
|
|
* We only consider plain relations here (toast rels will be processed |
|
|
|
* We only consider plain relations and materialized views here (toast |
|
|
|
* indirectly by reindex_relation). |
|
|
|
* rels will be processed indirectly by reindex_relation). |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
relationRelation = heap_open(RelationRelationId, AccessShareLock); |
|
|
|
relationRelation = heap_open(RelationRelationId, AccessShareLock); |
|
|
|
scan = heap_beginscan_catalog(relationRelation, 0, NULL); |
|
|
|
scan = heap_beginscan_catalog(relationRelation, 0, NULL); |
|
|
|