Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2bde297

Browse files
committed
Show schema names in pg_dump verbose output.
Fabrízio de Royes Mello, reviewed by Michael Paquier
1 parenta7ae1dc commit2bde297

File tree

2 files changed

+32
-14
lines changed

2 files changed

+32
-14
lines changed

‎src/bin/pg_dump/pg_backup_archiver.c

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -546,8 +546,13 @@ RestoreArchive(Archive *AHX)
546546
/* Both schema and data objects might now have ownership/ACLs */
547547
if ((te->reqs& (REQ_SCHEMA |REQ_DATA))!=0)
548548
{
549-
ahlog(AH,1,"setting owner and privileges for %s %s\n",
550-
te->desc,te->tag);
549+
/* Show namespace if available */
550+
if (te->namespace)
551+
ahlog(AH,1,"setting owner and privileges for %s \"%s\".\"%s\"\n",
552+
te->desc,te->namespace,te->tag);
553+
else
554+
ahlog(AH,1,"setting owner and privileges for %s \"%s\"\n",
555+
te->desc,te->tag);
551556
_printTocEntry(AH,te,ropt, false, true);
552557
}
553558
}
@@ -621,7 +626,13 @@ restore_toc_entry(ArchiveHandle *AH, TocEntry *te,
621626

622627
if ((reqs&REQ_SCHEMA)!=0)/* We want the schema */
623628
{
624-
ahlog(AH,1,"creating %s %s\n",te->desc,te->tag);
629+
/* Show namespace if available */
630+
if (te->namespace)
631+
ahlog(AH,1,"creating %s \"%s\".\"%s\"\n",
632+
te->desc,te->namespace,te->tag);
633+
else
634+
ahlog(AH,1,"creating %s \"%s\"\n",te->desc,te->tag);
635+
625636

626637
_printTocEntry(AH,te,ropt, false, false);
627638
defnDumped= true;
@@ -713,8 +724,8 @@ restore_toc_entry(ArchiveHandle *AH, TocEntry *te,
713724
_becomeOwner(AH,te);
714725
_selectOutputSchema(AH,te->namespace);
715726

716-
ahlog(AH,1,"processing data for table \"%s\"\n",
717-
te->tag);
727+
ahlog(AH,1,"processing data for table \"%s\".\"%s\"\n",
728+
te->namespace,te->tag);
718729

719730
/*
720731
* In parallel restore, if we created the table earlier in

‎src/bin/pg_dump/pg_dump.c

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1400,7 +1400,8 @@ dumpTableData_copy(Archive *fout, void *dcontext)
14001400
constchar*column_list;
14011401

14021402
if (g_verbose)
1403-
write_msg(NULL,"dumping contents of table %s\n",classname);
1403+
write_msg(NULL,"dumping contents of table \"%s\".\"%s\"\n",
1404+
tbinfo->dobj.namespace->dobj.name,classname);
14041405

14051406
/*
14061407
* Make sure we are in proper schema. We will qualify the table name
@@ -5019,7 +5020,8 @@ getIndexes(Archive *fout, TableInfo tblinfo[], int numTables)
50195020
continue;
50205021

50215022
if (g_verbose)
5022-
write_msg(NULL,"reading indexes for table \"%s\"\n",
5023+
write_msg(NULL,"reading indexes for table \"%s\".\"%s\"\n",
5024+
tbinfo->dobj.namespace->dobj.name,
50235025
tbinfo->dobj.name);
50245026

50255027
/* Make sure we are in proper schema so indexdef is right */
@@ -5385,7 +5387,8 @@ getConstraints(Archive *fout, TableInfo tblinfo[], int numTables)
53855387
continue;
53865388

53875389
if (g_verbose)
5388-
write_msg(NULL,"reading foreign key constraints for table \"%s\"\n",
5390+
write_msg(NULL,"reading foreign key constraints for table \"%s\".\"%s\"\n",
5391+
tbinfo->dobj.namespace->dobj.name,
53895392
tbinfo->dobj.name);
53905393

53915394
/*
@@ -5723,7 +5726,8 @@ getTriggers(Archive *fout, TableInfo tblinfo[], int numTables)
57235726
continue;
57245727

57255728
if (g_verbose)
5726-
write_msg(NULL,"reading triggers for table \"%s\"\n",
5729+
write_msg(NULL,"reading triggers for table \"%s\".\"%s\"\n",
5730+
tbinfo->dobj.namespace->dobj.name,
57275731
tbinfo->dobj.name);
57285732

57295733
/*
@@ -6336,8 +6340,9 @@ getTableAttrs(Archive *fout, TableInfo *tblinfo, int numTables)
63366340
* the output of an indexscan on pg_attribute_relid_attnum_index.
63376341
*/
63386342
if (g_verbose)
6339-
write_msg(NULL,"finding the columns and types of table \"%s\"\n",
6340-
tbinfo->dobj.name);
6343+
write_msg(NULL,"finding the columns and types of table \"%s\".\"%s\"\n",
6344+
tbinfo->dobj.namespace->dobj.name,
6345+
tbinfo->dobj.name);
63416346

63426347
resetPQExpBuffer(q);
63436348

@@ -6548,8 +6553,9 @@ getTableAttrs(Archive *fout, TableInfo *tblinfo, int numTables)
65486553
intnumDefaults;
65496554

65506555
if (g_verbose)
6551-
write_msg(NULL,"finding default expressions of table \"%s\"\n",
6552-
tbinfo->dobj.name);
6556+
write_msg(NULL,"finding default expressions of table \"%s\".\"%s\"\n",
6557+
tbinfo->dobj.namespace->dobj.name,
6558+
tbinfo->dobj.name);
65536559

65546560
resetPQExpBuffer(q);
65556561
if (fout->remoteVersion >=70300)
@@ -6672,7 +6678,8 @@ getTableAttrs(Archive *fout, TableInfo *tblinfo, int numTables)
66726678
intnumConstrs;
66736679

66746680
if (g_verbose)
6675-
write_msg(NULL,"finding check constraints for table \"%s\"\n",
6681+
write_msg(NULL,"finding check constraints for table \"%s\".\"%s\"\n",
6682+
tbinfo->dobj.namespace->dobj.name,
66766683
tbinfo->dobj.name);
66776684

66786685
resetPQExpBuffer(q);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp