Skip to content

Commit 27af56b

Browse files
committed
pg_dump: Fix some messages
Make quoting style match existing style. Improve plural support.
1 parent 90d0377 commit 27af56b

File tree

3 files changed

+16
-14
lines changed

3 files changed

+16
-14
lines changed

src/bin/pg_dump/pg_backup_archiver.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,7 @@ RestoreArchive(Archive *AHX)
624624
{
625625
/* Show namespace if available */
626626
if (te->namespace)
627-
ahlog(AH, 1, "setting owner and privileges for %s \"%s\".\"%s\"\n",
627+
ahlog(AH, 1, "setting owner and privileges for %s \"%s.%s\"\n",
628628
te->desc, te->namespace, te->tag);
629629
else
630630
ahlog(AH, 1, "setting owner and privileges for %s \"%s\"\n",
@@ -704,7 +704,7 @@ restore_toc_entry(ArchiveHandle *AH, TocEntry *te,
704704
{
705705
/* Show namespace if available */
706706
if (te->namespace)
707-
ahlog(AH, 1, "creating %s \"%s\".\"%s\"\n",
707+
ahlog(AH, 1, "creating %s \"%s.%s\"\n",
708708
te->desc, te->namespace, te->tag);
709709
else
710710
ahlog(AH, 1, "creating %s \"%s\"\n", te->desc, te->tag);
@@ -800,7 +800,7 @@ restore_toc_entry(ArchiveHandle *AH, TocEntry *te,
800800
_becomeOwner(AH, te);
801801
_selectOutputSchema(AH, te->namespace);
802802

803-
ahlog(AH, 1, "processing data for table \"%s\".\"%s\"\n",
803+
ahlog(AH, 1, "processing data for table \"%s.%s\"\n",
804804
te->namespace, te->tag);
805805

806806
/*

src/bin/pg_dump/pg_dump.c

+10-10
Original file line numberDiff line numberDiff line change
@@ -905,7 +905,7 @@ help(const char *progname)
905905
printf(_(" --quote-all-identifiers quote all identifiers, even if not key words\n"));
906906
printf(_(" --section=SECTION dump named section (pre-data, data, or post-data)\n"));
907907
printf(_(" --serializable-deferrable wait until the dump can run without anomalies\n"));
908-
printf(_(" --snapshot=SNAPSHOT use given synchronous snapshot for the dump\n"));
908+
printf(_(" --snapshot=SNAPSHOT use given snapshot for the dump\n"));
909909
printf(_(" --use-set-session-authorization\n"
910910
" use SET SESSION AUTHORIZATION commands instead of\n"
911911
" ALTER OWNER commands to set ownership\n"));
@@ -1436,7 +1436,7 @@ dumpTableData_copy(Archive *fout, DumpOptions *dopt, void *dcontext)
14361436
const char *column_list;
14371437

14381438
if (g_verbose)
1439-
write_msg(NULL, "dumping contents of table \"%s\".\"%s\"\n",
1439+
write_msg(NULL, "dumping contents of table \"%s.%s\"\n",
14401440
tbinfo->dobj.namespace->dobj.name, classname);
14411441

14421442
/*
@@ -2833,7 +2833,7 @@ getPolicies(Archive *fout, TableInfo tblinfo[], int numTables)
28332833
continue;
28342834

28352835
if (g_verbose)
2836-
write_msg(NULL, "reading row security enabled for table \"%s\".\"%s\"\n",
2836+
write_msg(NULL, "reading row security enabled for table \"%s.%s\"\n",
28372837
tbinfo->dobj.namespace->dobj.name,
28382838
tbinfo->dobj.name);
28392839

@@ -2864,7 +2864,7 @@ getPolicies(Archive *fout, TableInfo tblinfo[], int numTables)
28642864
}
28652865

28662866
if (g_verbose)
2867-
write_msg(NULL, "reading policies for table \"%s\".\"%s\"\n",
2867+
write_msg(NULL, "reading policies for table \"%s.%s\"\n",
28682868
tbinfo->dobj.namespace->dobj.name,
28692869
tbinfo->dobj.name);
28702870

@@ -5308,7 +5308,7 @@ getIndexes(Archive *fout, TableInfo tblinfo[], int numTables)
53085308
continue;
53095309

53105310
if (g_verbose)
5311-
write_msg(NULL, "reading indexes for table \"%s\".\"%s\"\n",
5311+
write_msg(NULL, "reading indexes for table \"%s.%s\"\n",
53125312
tbinfo->dobj.namespace->dobj.name,
53135313
tbinfo->dobj.name);
53145314

@@ -5675,7 +5675,7 @@ getConstraints(Archive *fout, TableInfo tblinfo[], int numTables)
56755675
continue;
56765676

56775677
if (g_verbose)
5678-
write_msg(NULL, "reading foreign key constraints for table \"%s\".\"%s\"\n",
5678+
write_msg(NULL, "reading foreign key constraints for table \"%s.%s\"\n",
56795679
tbinfo->dobj.namespace->dobj.name,
56805680
tbinfo->dobj.name);
56815681

@@ -6014,7 +6014,7 @@ getTriggers(Archive *fout, TableInfo tblinfo[], int numTables)
60146014
continue;
60156015

60166016
if (g_verbose)
6017-
write_msg(NULL, "reading triggers for table \"%s\".\"%s\"\n",
6017+
write_msg(NULL, "reading triggers for table \"%s.%s\"\n",
60186018
tbinfo->dobj.namespace->dobj.name,
60196019
tbinfo->dobj.name);
60206020

@@ -6748,7 +6748,7 @@ getTableAttrs(Archive *fout, DumpOptions *dopt, TableInfo *tblinfo, int numTable
67486748
* the output of an indexscan on pg_attribute_relid_attnum_index.
67496749
*/
67506750
if (g_verbose)
6751-
write_msg(NULL, "finding the columns and types of table \"%s\".\"%s\"\n",
6751+
write_msg(NULL, "finding the columns and types of table \"%s.%s\"\n",
67526752
tbinfo->dobj.namespace->dobj.name,
67536753
tbinfo->dobj.name);
67546754

@@ -6961,7 +6961,7 @@ getTableAttrs(Archive *fout, DumpOptions *dopt, TableInfo *tblinfo, int numTable
69616961
int numDefaults;
69626962

69636963
if (g_verbose)
6964-
write_msg(NULL, "finding default expressions of table \"%s\".\"%s\"\n",
6964+
write_msg(NULL, "finding default expressions of table \"%s.%s\"\n",
69656965
tbinfo->dobj.namespace->dobj.name,
69666966
tbinfo->dobj.name);
69676967

@@ -7086,7 +7086,7 @@ getTableAttrs(Archive *fout, DumpOptions *dopt, TableInfo *tblinfo, int numTable
70867086
int numConstrs;
70877087

70887088
if (g_verbose)
7089-
write_msg(NULL, "finding check constraints for table \"%s\".\"%s\"\n",
7089+
write_msg(NULL, "finding check constraints for table \"%s.%s\"\n",
70907090
tbinfo->dobj.namespace->dobj.name,
70917091
tbinfo->dobj.name);
70927092

src/bin/pg_dump/pg_dump_sort.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -1247,7 +1247,9 @@ repairDependencyLoop(DumpableObject **loop,
12471247
}
12481248
if (i >= nLoop)
12491249
{
1250-
write_msg(NULL, "NOTICE: there are circular foreign-key constraints among these table(s):\n");
1250+
write_msg(NULL, ngettext("NOTICE: there are circular foreign-key constraints on this table:\n",
1251+
"NOTICE: there are circular foreign-key constraints among these tables:\n",
1252+
nLoop));
12511253
for (i = 0; i < nLoop; i++)
12521254
write_msg(NULL, " %s\n", loop[i]->name);
12531255
write_msg(NULL, "You might not be able to restore the dump without using --disable-triggers or temporarily dropping the constraints.\n");

0 commit comments

Comments
 (0)