aboutsummaryrefslogtreecommitdiff
path: root/src/bin/pg_dump/pg_backup_archiver.c
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2014-08-26 11:50:48 +0300
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2014-08-26 11:50:48 +0300
commit2bde29739d1e28f58e901b7e53057b8ddc0ec286 (patch)
tree7bd2491817b64c5d2ba6c273a1e7f3b7771c7391 /src/bin/pg_dump/pg_backup_archiver.c
parenta7ae1dcf4939cf643c5abe8dd673e4b87a6efd42 (diff)
downloadpostgresql-2bde29739d1e28f58e901b7e53057b8ddc0ec286.tar.gz
postgresql-2bde29739d1e28f58e901b7e53057b8ddc0ec286.zip
Show schema names in pg_dump verbose output.
Fabrízio de Royes Mello, reviewed by Michael Paquier
Diffstat (limited to 'src/bin/pg_dump/pg_backup_archiver.c')
-rw-r--r--src/bin/pg_dump/pg_backup_archiver.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/src/bin/pg_dump/pg_backup_archiver.c b/src/bin/pg_dump/pg_backup_archiver.c
index 3aebac87272..00187200ffa 100644
--- a/src/bin/pg_dump/pg_backup_archiver.c
+++ b/src/bin/pg_dump/pg_backup_archiver.c
@@ -546,8 +546,13 @@ RestoreArchive(Archive *AHX)
/* Both schema and data objects might now have ownership/ACLs */
if ((te->reqs & (REQ_SCHEMA | REQ_DATA)) != 0)
{
- ahlog(AH, 1, "setting owner and privileges for %s %s\n",
- te->desc, te->tag);
+ /* Show namespace if available */
+ if (te->namespace)
+ ahlog(AH, 1, "setting owner and privileges for %s \"%s\".\"%s\"\n",
+ te->desc, te->namespace, te->tag);
+ else
+ ahlog(AH, 1, "setting owner and privileges for %s \"%s\"\n",
+ te->desc, te->tag);
_printTocEntry(AH, te, ropt, false, true);
}
}
@@ -621,7 +626,13 @@ restore_toc_entry(ArchiveHandle *AH, TocEntry *te,
if ((reqs & REQ_SCHEMA) != 0) /* We want the schema */
{
- ahlog(AH, 1, "creating %s %s\n", te->desc, te->tag);
+ /* Show namespace if available */
+ if (te->namespace)
+ ahlog(AH, 1, "creating %s \"%s\".\"%s\"\n",
+ te->desc, te->namespace, te->tag);
+ else
+ ahlog(AH, 1, "creating %s \"%s\"\n", te->desc, te->tag);
+
_printTocEntry(AH, te, ropt, false, false);
defnDumped = true;
@@ -713,8 +724,8 @@ restore_toc_entry(ArchiveHandle *AH, TocEntry *te,
_becomeOwner(AH, te);
_selectOutputSchema(AH, te->namespace);
- ahlog(AH, 1, "processing data for table \"%s\"\n",
- te->tag);
+ ahlog(AH, 1, "processing data for table \"%s\".\"%s\"\n",
+ te->namespace, te->tag);
/*
* In parallel restore, if we created the table earlier in