diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2017-10-03 18:53:44 -0400 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2017-10-03 18:53:44 -0400 |
| commit | 11d8d72c27a64ea4e30adce11cf6c4f3dd3e60db (patch) | |
| tree | edfc217d80302fb5f5a6a36f8de4312e832b634b /src/backend/nodes/copyfuncs.c | |
| parent | 45f9d08684d954b0e514b69f270e763d2785dd53 (diff) | |
| download | postgresql-11d8d72c27a64ea4e30adce11cf6c4f3dd3e60db.tar.gz | |
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
Diffstat (limited to 'src/backend/nodes/copyfuncs.c')
| -rw-r--r-- | src/backend/nodes/copyfuncs.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/backend/nodes/copyfuncs.c b/src/backend/nodes/copyfuncs.c index b274af26a4..c1a83ca909 100644 --- a/src/backend/nodes/copyfuncs.c +++ b/src/backend/nodes/copyfuncs.c @@ -3766,7 +3766,18 @@ _copyVacuumStmt(const VacuumStmt *from) VacuumStmt *newnode = makeNode(VacuumStmt); COPY_SCALAR_FIELD(options); + COPY_NODE_FIELD(rels); + + return newnode; +} + +static VacuumRelation * +_copyVacuumRelation(const VacuumRelation *from) +{ + VacuumRelation *newnode = makeNode(VacuumRelation); + COPY_NODE_FIELD(relation); + COPY_SCALAR_FIELD(oid); COPY_NODE_FIELD(va_cols); return newnode; @@ -5215,6 +5226,9 @@ copyObjectImpl(const void *from) case T_VacuumStmt: retval = _copyVacuumStmt(from); break; + case T_VacuumRelation: + retval = _copyVacuumRelation(from); + break; case T_ExplainStmt: retval = _copyExplainStmt(from); break; |
