diff options
Diffstat (limited to 'src/backend/tcop')
| -rw-r--r-- | src/backend/tcop/utility.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c index 81ac9b1cb2d..a42ead7d698 100644 --- a/src/backend/tcop/utility.c +++ b/src/backend/tcop/utility.c @@ -22,6 +22,7 @@ #include "access/xact.h" #include "access/xlog.h" #include "catalog/catalog.h" +#include "catalog/index.h" #include "catalog/namespace.h" #include "catalog/pg_inherits.h" #include "catalog/toasting.h" @@ -818,7 +819,7 @@ standard_ProcessUtility(PlannedStmt *pstmt, break; case T_ClusterStmt: - cluster((ClusterStmt *) parsetree, isTopLevel); + cluster(pstate, (ClusterStmt *) parsetree, isTopLevel); break; case T_VacuumStmt: @@ -918,20 +919,20 @@ standard_ProcessUtility(PlannedStmt *pstmt, case T_ReindexStmt: { ReindexStmt *stmt = (ReindexStmt *) parsetree; + int options; - if ((stmt->options & REINDEXOPT_CONCURRENTLY) != 0) + options = ReindexParseOptions(pstate, stmt); + if ((options & REINDEXOPT_CONCURRENTLY) != 0) PreventInTransactionBlock(isTopLevel, "REINDEX CONCURRENTLY"); switch (stmt->kind) { case REINDEX_OBJECT_INDEX: - ReindexIndex(stmt->relation, stmt->options, - isTopLevel); + ReindexIndex(stmt->relation, options, isTopLevel); break; case REINDEX_OBJECT_TABLE: - ReindexTable(stmt->relation, stmt->options, - isTopLevel); + ReindexTable(stmt->relation, options, isTopLevel); break; case REINDEX_OBJECT_SCHEMA: case REINDEX_OBJECT_SYSTEM: @@ -947,7 +948,7 @@ standard_ProcessUtility(PlannedStmt *pstmt, (stmt->kind == REINDEX_OBJECT_SCHEMA) ? "REINDEX SCHEMA" : (stmt->kind == REINDEX_OBJECT_SYSTEM) ? "REINDEX SYSTEM" : "REINDEX DATABASE"); - ReindexMultipleTables(stmt->name, stmt->kind, stmt->options); + ReindexMultipleTables(stmt->name, stmt->kind, options); break; default: elog(ERROR, "unrecognized object type: %d", |
