mirror of
https://github.com/postgres/postgres.git
synced 2025-10-16 17:07:43 +03:00
Improve pg_restore's -t switch to match all types of relations.
-t will now match views, foreign tables, materialized views, and sequences, not only plain tables. This is more useful, and also more consistent with the behavior of pg_dump's -t switch, which has always matched all relation types. We're still not there on matching pg_dump's behavior entirely, so mention that in the docs. Craig Ringer, reviewed by Pavel Stehule
This commit is contained in:
@@ -2663,7 +2663,13 @@ _tocEntryRequired(TocEntry *te, teSection curSection, RestoreOptions *ropt)
|
||||
if (ropt->selTypes)
|
||||
{
|
||||
if (strcmp(te->desc, "TABLE") == 0 ||
|
||||
strcmp(te->desc, "TABLE DATA") == 0)
|
||||
strcmp(te->desc, "TABLE DATA") == 0 ||
|
||||
strcmp(te->desc, "VIEW") == 0 ||
|
||||
strcmp(te->desc, "FOREIGN TABLE") == 0 ||
|
||||
strcmp(te->desc, "MATERIALIZED VIEW") == 0 ||
|
||||
strcmp(te->desc, "MATERIALIZED VIEW DATA") == 0 ||
|
||||
strcmp(te->desc, "SEQUENCE") == 0 ||
|
||||
strcmp(te->desc, "SEQUENCE SET") == 0)
|
||||
{
|
||||
if (!ropt->selTable)
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user