Add VACUUM ANALYZE support

Just another flag.
pull/1013/head
Jason Petersen 2016-12-12 15:38:07 -07:00
parent 1b98b3ef72
commit 210c840d14
No known key found for this signature in database
GPG Key ID: 9F1D3510D110ABA9
1 changed files with 13 additions and 7 deletions

View File

@ -980,6 +980,7 @@ DeparseVacuumStmtPrefix(VacuumStmt *vacuumStmt)
{
StringInfo vacuumPrefix = makeStringInfo();
const int supportedFlags = (
VACOPT_ANALYZE |
#if (PG_VERSION_NUM >= 90600)
VACOPT_DISABLE_PAGE_SKIPPING |
#endif
@ -997,6 +998,18 @@ DeparseVacuumStmtPrefix(VacuumStmt *vacuumStmt)
appendStringInfoChar(vacuumPrefix, '(');
if (vacuumFlags & VACOPT_ANALYZE)
{
appendStringInfoString(vacuumPrefix, "ANALYZE,");
}
#if (PG_VERSION_NUM >= 90600)
if (vacuumFlags & VACOPT_DISABLE_PAGE_SKIPPING)
{
appendStringInfoString(vacuumPrefix, "DISABLE_PAGE_SKIPPING,");
}
#endif
if (vacuumFlags & VACOPT_FREEZE)
{
appendStringInfoString(vacuumPrefix, "FREEZE,");
@ -1007,13 +1020,6 @@ DeparseVacuumStmtPrefix(VacuumStmt *vacuumStmt)
appendStringInfoString(vacuumPrefix, "FULL,");
}
#if (PG_VERSION_NUM >= 90600)
if (vacuumFlags & VACOPT_DISABLE_PAGE_SKIPPING)
{
appendStringInfoString(vacuumPrefix, "DISABLE_PAGE_SKIPPING,");
}
#endif
vacuumPrefix->data[vacuumPrefix->len - 1] = ')';
appendStringInfoChar(vacuumPrefix, ' ');