From f3af53441ed0b306692a1cc31003a84d1b5b3cf7 Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Thu, 17 Jan 2013 11:24:47 +0100 Subject: [PATCH] Support multiple -t/--table arguments for more commands On top of the previous support in pg_dump, add support to specify multiple tables (by using the -t option multiple times) to pg_restore, clsuterdb, reindexdb and vacuumdb. Josh Kupershmidt, reviewed by Karl O. Pinc --- doc/src/sgml/ref/clusterdb.sgml | 14 ++++++- doc/src/sgml/ref/pg_restore.sgml | 3 +- doc/src/sgml/ref/reindexdb.sgml | 39 ++++++++++++------- doc/src/sgml/ref/vacuumdb.sgml | 20 ++++++---- src/bin/pg_dump/common.c | 31 --------------- src/bin/pg_dump/dumputils.c | 33 ++++++++++++++++ src/bin/pg_dump/dumputils.h | 17 ++++++++ src/bin/pg_dump/pg_backup.h | 3 +- src/bin/pg_dump/pg_backup_archiver.c | 2 +- src/bin/pg_dump/pg_dump.h | 13 ------- src/bin/pg_dump/pg_restore.c | 4 +- src/bin/scripts/Makefile | 2 +- src/bin/scripts/clusterdb.c | 29 ++++++++++---- src/bin/scripts/reindexdb.c | 58 +++++++++++++++++----------- src/bin/scripts/vacuumdb.c | 34 +++++++++++----- 15 files changed, 191 insertions(+), 111 deletions(-) diff --git a/doc/src/sgml/ref/clusterdb.sgml b/doc/src/sgml/ref/clusterdb.sgml index 097ea912f1c..13169324500 100644 --- a/doc/src/sgml/ref/clusterdb.sgml +++ b/doc/src/sgml/ref/clusterdb.sgml @@ -24,7 +24,17 @@ PostgreSQL documentation clusterdb connection-option - table + + + + + + + + table + + + dbname @@ -117,6 +127,8 @@ PostgreSQL documentation Cluster table only. + Multiple tables can be clustered by writing multiple + diff --git a/doc/src/sgml/ref/pg_restore.sgml b/doc/src/sgml/ref/pg_restore.sgml index f4668e73f6d..0d73294930f 100644 --- a/doc/src/sgml/ref/pg_restore.sgml +++ b/doc/src/sgml/ref/pg_restore.sgml @@ -400,7 +400,8 @@ - Restore definition and/or data of named table only. This can be + Restore definition and/or data of named table only. Multiple tables + may be specified with multiple option to specify a schema. diff --git a/doc/src/sgml/ref/reindexdb.sgml b/doc/src/sgml/ref/reindexdb.sgml index 781012f3c58..3ba9951df8e 100644 --- a/doc/src/sgml/ref/reindexdb.sgml +++ b/doc/src/sgml/ref/reindexdb.sgml @@ -23,20 +23,27 @@ PostgreSQL documentation reindexdb connection-option - - - - - - table - - - - - - - index - + + + + + + + + table + + + + + + + + + + index + + + dbname @@ -128,6 +135,8 @@ PostgreSQL documentation Recreate index only. + Multiple indexes can be recreated by writing multiple + @@ -158,6 +167,8 @@ PostgreSQL documentation Reindex table only. + Multiple tables can be reindexed by writing multiple + diff --git a/doc/src/sgml/ref/vacuumdb.sgml b/doc/src/sgml/ref/vacuumdb.sgml index c60ba4424fe..a5216ec0389 100644 --- a/doc/src/sgml/ref/vacuumdb.sgml +++ b/doc/src/sgml/ref/vacuumdb.sgml @@ -24,14 +24,18 @@ PostgreSQL documentation vacuumdb connection-option option - - - - - - table - ( column [,...] ) + + + + + + + + table + ( column [,...] ) + + dbname @@ -147,6 +151,8 @@ PostgreSQL documentation Clean or analyze table only. Column names can be specified only in conjunction with the or options. + Multiple tables can be vacuumed by writing multiple +