On Thu, Apr 17, 2014 at 2:14 AM, Michael Paquier <michael.paqu...@gmail.com> wrote: > > On Thu, Apr 17, 2014 at 11:41 AM, Fabrízio de Royes Mello > <fabriziome...@gmail.com> wrote: > > Hi all, > > > > There are some reason to verbose output of pg_dump don't show schema name? > > > > A output example of using "pg_dump -Fd -j8 -v" > Specifying a target directory with "-f" is better here... >
Yeah... I'm just show the relevant options used... ;-) > > This database have a lot of different schemas with same structure and if I > > need do view the status of dump I don't know what schema the table are dump > > from. > Yes this may be helpful. The attached quick'n dirty patch implements it. > Very nice... thanks!!! I add schema name do the following messages too: pg_restore: processing data for table "public"."bar" pg_restore: processing data for table "public"."foo" pg_restore: processing data for table "s1"."bar" pg_restore: processing data for table "s1"."foo" pg_restore: processing data for table "s2"."bar" pg_restore: processing data for table "s2"."foo" pg_restore: processing data for table "s3"."bar" pg_restore: processing data for table "s3"."foo" And: pg_dump: finding the columns and types of table "s1"."foo" pg_dump: finding the columns and types of table "s1"."bar" pg_dump: finding the columns and types of table "s2"."foo" pg_dump: finding the columns and types of table "s2"."bar" pg_dump: finding the columns and types of table "s3"."foo" pg_dump: finding the columns and types of table "s3"."bar" pg_dump: finding the columns and types of table "public"."foo" pg_dump: finding the columns and types of table "public"."bar" And: pg_dump: processing data for table "public"."bar" pg_dump: dumping contents of table public.bar pg_dump: processing data for table "public"."foo" pg_dump: dumping contents of table public.foo pg_dump: processing data for table "s1"."bar" pg_dump: dumping contents of table s1.bar pg_dump: processing data for table "s1"."foo" pg_dump: dumping contents of table s1.foo pg_dump: processing data for table "s2"."bar" pg_dump: dumping contents of table s2.bar pg_dump: processing data for table "s2"."foo" pg_dump: dumping contents of table s2.foo pg_dump: processing data for table "s3"."bar" pg_dump: dumping contents of table s3.bar pg_dump: processing data for table "s3"."foo" pg_dump: dumping contents of table s3.foo Regards, -- Fabrízio de Royes Mello Consultoria/Coaching PostgreSQL >> Timbira: http://www.timbira.com.br >> Blog sobre TI: http://fabriziomello.blogspot.com >> Perfil Linkedin: http://br.linkedin.com/in/fabriziomello >> Twitter: http://twitter.com/fabriziomello
diff --git a/src/bin/pg_dump/pg_backup_archiver.c b/src/bin/pg_dump/pg_backup_archiver.c index 9464540..7f73e8d 100644 --- a/src/bin/pg_dump/pg_backup_archiver.c +++ b/src/bin/pg_dump/pg_backup_archiver.c @@ -706,8 +706,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", + AH->currSchema, te->tag); /* * In parallel restore, if we created the table earlier in diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index a6c0428..f763a88 100644 --- a/src/bin/pg_dump/pg_dump.c +++ b/src/bin/pg_dump/pg_dump.c @@ -1400,7 +1400,17 @@ dumpTableData_copy(Archive *fout, void *dcontext) const char *column_list; if (g_verbose) - write_msg(NULL, "dumping contents of table %s\n", classname); + { + /* Print namespace information if available */ + if (tbinfo->dobj.namespace != NULL && + tbinfo->dobj.namespace->dobj.name != NULL) + write_msg(NULL, "dumping contents of table %s.%s\n", + tbinfo->dobj.namespace->dobj.name, + classname); + else + write_msg(NULL, "dumping contents of table %s\n", + classname); + } /* * Make sure we are in proper schema. We will qualify the table name @@ -6291,8 +6301,17 @@ getTableAttrs(Archive *fout, TableInfo *tblinfo, int numTables) * the output of an indexscan on pg_attribute_relid_attnum_index. */ if (g_verbose) - write_msg(NULL, "finding the columns and types of table \"%s\"\n", - tbinfo->dobj.name); + { + /* Print namespace information if available */ + if (tbinfo->dobj.namespace != NULL && + tbinfo->dobj.namespace->dobj.name != NULL) + write_msg(NULL, "finding the columns and types of table \"%s\".\"%s\"\n", + tbinfo->dobj.namespace->dobj.name, + tbinfo->dobj.name); + else + write_msg(NULL, "finding the columns and types of table \"%s\"\n", + tbinfo->dobj.name); + } resetPQExpBuffer(q);
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers