aboutsummaryrefslogtreecommitdiff
path: root/src/backend/tcop
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2019-03-18 15:14:52 -0400
committerRobert Haas <rhaas@postgresql.org>2019-03-18 15:14:52 -0400
commit6776142a07afb4c28961f27059d800196902f5f1 (patch)
treec71c15c97de920478294cba59d2f6e10d5935147 /src/backend/tcop
parentf41551f61f9cf4eedd5b7173f985a3bdb4d9858c (diff)
downloadpostgresql-6776142a07afb4c28961f27059d800196902f5f1.tar.gz
postgresql-6776142a07afb4c28961f27059d800196902f5f1.zip
Revise parse tree representation for VACUUM and ANALYZE.
Like commit f41551f61f9cf4eedd5b7173f985a3bdb4d9858c, this aims to make it easier to add non-Boolean options to VACUUM (or, in this case, to ANALYZE). Instead of building up a bitmap of options directly in the parser, build up a list of DefElem objects and let ExecVacuum() sort it out; right now, we make no use of the fact that a DefElem can carry an associated value, but it will be easy to make that change in the future. Masahiko Sawada Discussion: http://postgr.es/m/CAD21AoATE4sn0jFFH3NcfUZXkU2BMbjBWB_kDj-XWYA-LXDcQA@mail.gmail.com
Diffstat (limited to 'src/backend/tcop')
-rw-r--r--src/backend/tcop/utility.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c
index 6ec795f1b46..bdfaa506e7e 100644
--- a/src/backend/tcop/utility.c
+++ b/src/backend/tcop/utility.c
@@ -664,10 +664,10 @@ standard_ProcessUtility(PlannedStmt *pstmt,
VacuumStmt *stmt = (VacuumStmt *) parsetree;
/* we choose to allow this during "read only" transactions */
- PreventCommandDuringRecovery((stmt->options & VACOPT_VACUUM) ?
+ PreventCommandDuringRecovery(stmt->is_vacuumcmd ?
"VACUUM" : "ANALYZE");
/* forbidden in parallel mode due to CommandIsReadOnly */
- ExecVacuum(stmt, isTopLevel);
+ ExecVacuum(pstate, stmt, isTopLevel);
}
break;
@@ -2570,7 +2570,7 @@ CreateCommandTag(Node *parsetree)
break;
case T_VacuumStmt:
- if (((VacuumStmt *) parsetree)->options & VACOPT_VACUUM)
+ if (((VacuumStmt *) parsetree)->is_vacuumcmd)
tag = "VACUUM";
else
tag = "ANALYZE";