On Sun, Oct 28, 2012 at 4:30 PM, Josh Kupershmidt <schmi...@gmail.com> wrote:
> I see there's already a TODO for allowing pg_restore to accept > multiple --table arguments[1], but would folks support adding this > capability to various other commands which currently accept only a > single --table argument, such as clusterdb, vacuumdb, and reindexdb? I went ahead and cooked up a patch to allow pg_restore, clusterdb, vacuumdb, and reindexdb to accept multiple --table switches. Hope I didn't overlook a similar tool, but these were the only other commands I found taking a --table argument. If you run, say: pg_dump -Fc --table=tab1 --table=tab2 ... | pg_restore --table=tab1 --table=tab2 ... without the patch, only "tab2" will be restored and pg_restore will make no mention of this omission to the user. With the patch, both tables should be restored. I also added support for multiple --index options for reindexdb, since that use-case seemed symmetrical to --table. As suggested previously, I moved the SimpleStringList types and functions out of pg_dump.h and common.c into dumputils.{h,c}, so that the code in ./src/bin/scripts/ could use it. If there are no objections, I can add the patch to the next CF. Josh
multiple_tables.v1.diff
Description: Binary data
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers