1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-23 14:01:44 +03:00

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
This commit is contained in:
Magnus Hagander
2013-01-17 11:24:47 +01:00
parent 36bdfa52a0
commit f3af53441e
15 changed files with 191 additions and 111 deletions

View File

@ -2493,7 +2493,7 @@ _tocEntryRequired(TocEntry *te, teSection curSection, RestoreOptions *ropt)
{
if (!ropt->selTable)
return 0;
if (ropt->tableNames && strcmp(ropt->tableNames, te->tag) != 0)
if (ropt->tableNames.head != NULL && (!(simple_string_list_member(&ropt->tableNames, te->tag))))
return 0;
}
else if (strcmp(te->desc, "INDEX") == 0)