1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-10 17:42:29 +03:00

Allow multiple tables to be specified in one VACUUM or ANALYZE command.

Not much to say about this; does what it says on the tin.

However, formerly, if there was a column list then the ANALYZE action was
implied; now it must be specified, or you get an error.  This is because
it would otherwise be a bit unclear what the user meant if some tables
have column lists and some don't.

Nathan Bossart, reviewed by Michael Paquier and Masahiko Sawada, with some
editorialization by me

Discussion: https://postgr.es/m/E061A8E3-5E3D-494D-94F0-E8A9B312BBFC@amazon.com
This commit is contained in:
Tom Lane
2017-10-03 18:53:44 -04:00
parent 45f9d08684
commit 11d8d72c27
14 changed files with 329 additions and 159 deletions

View File

@@ -1663,7 +1663,16 @@ static bool
_equalVacuumStmt(const VacuumStmt *a, const VacuumStmt *b)
{
COMPARE_SCALAR_FIELD(options);
COMPARE_NODE_FIELD(rels);
return true;
}
static bool
_equalVacuumRelation(const VacuumRelation *a, const VacuumRelation *b)
{
COMPARE_NODE_FIELD(relation);
COMPARE_SCALAR_FIELD(oid);
COMPARE_NODE_FIELD(va_cols);
return true;
@@ -3361,6 +3370,9 @@ equal(const void *a, const void *b)
case T_VacuumStmt:
retval = _equalVacuumStmt(a, b);
break;
case T_VacuumRelation:
retval = _equalVacuumRelation(a, b);
break;
case T_ExplainStmt:
retval = _equalExplainStmt(a, b);
break;