]> granicus.if.org Git - postgresql/commitdiff
pg_dump: Fix some messages
authorPeter Eisentraut <peter_e@gmx.net>
Mon, 28 Sep 2015 00:29:40 +0000 (20:29 -0400)
committerPeter Eisentraut <peter_e@gmx.net>
Mon, 28 Sep 2015 00:34:40 +0000 (20:34 -0400)
Make quoting style match existing style.  Improve plural support.

src/bin/pg_dump/pg_backup_archiver.c
src/bin/pg_dump/pg_dump.c
src/bin/pg_dump/pg_dump_sort.c

index 0d52babc4f1794f3ce006e3846a1813b4b7c834a..d16dbbd5a895ae26b9f08dc9715fb058fc914839 100644 (file)
@@ -624,7 +624,7 @@ RestoreArchive(Archive *AHX)
                {
                        /* Show namespace if available */
                        if (te->namespace)
-                               ahlog(AH, 1, "setting owner and privileges for %s \"%s\".\"%s\"\n",
+                               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",
@@ -704,7 +704,7 @@ restore_toc_entry(ArchiveHandle *AH, TocEntry *te,
        {
                /* Show namespace if available */
                if (te->namespace)
-                       ahlog(AH, 1, "creating %s \"%s\".\"%s\"\n",
+                       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);
@@ -800,7 +800,7 @@ restore_toc_entry(ArchiveHandle *AH, TocEntry *te,
                                        _becomeOwner(AH, te);
                                        _selectOutputSchema(AH, te->namespace);
 
-                                       ahlog(AH, 1, "processing data for table \"%s\".\"%s\"\n",
+                                       ahlog(AH, 1, "processing data for table \"%s.%s\"\n",
                                                  te->namespace, te->tag);
 
                                        /*
index 25ac911c3ed7077ad604a6acdb74aed386a69ee0..b33bdc391ed1ba16f23d283b771765c972eaae64 100644 (file)
@@ -905,7 +905,7 @@ help(const char *progname)
        printf(_("  --quote-all-identifiers      quote all identifiers, even if not key words\n"));
        printf(_("  --section=SECTION            dump named section (pre-data, data, or post-data)\n"));
        printf(_("  --serializable-deferrable    wait until the dump can run without anomalies\n"));
-       printf(_("  --snapshot=SNAPSHOT          use given synchronous snapshot for the dump\n"));
+       printf(_("  --snapshot=SNAPSHOT          use given snapshot for the dump\n"));
        printf(_("  --use-set-session-authorization\n"
                         "                               use SET SESSION AUTHORIZATION commands instead of\n"
                         "                               ALTER OWNER commands to set ownership\n"));
@@ -1436,7 +1436,7 @@ dumpTableData_copy(Archive *fout, DumpOptions *dopt, void *dcontext)
        const char *column_list;
 
        if (g_verbose)
-               write_msg(NULL, "dumping contents of table \"%s\".\"%s\"\n",
+               write_msg(NULL, "dumping contents of table \"%s.%s\"\n",
                                  tbinfo->dobj.namespace->dobj.name, classname);
 
        /*
@@ -2833,7 +2833,7 @@ getPolicies(Archive *fout, TableInfo tblinfo[], int numTables)
                        continue;
 
                if (g_verbose)
-                       write_msg(NULL, "reading row security enabled for table \"%s\".\"%s\"\n",
+                       write_msg(NULL, "reading row security enabled for table \"%s.%s\"\n",
                                          tbinfo->dobj.namespace->dobj.name,
                                          tbinfo->dobj.name);
 
@@ -2864,7 +2864,7 @@ getPolicies(Archive *fout, TableInfo tblinfo[], int numTables)
                }
 
                if (g_verbose)
-                       write_msg(NULL, "reading policies for table \"%s\".\"%s\"\n",
+                       write_msg(NULL, "reading policies for table \"%s.%s\"\n",
                                          tbinfo->dobj.namespace->dobj.name,
                                          tbinfo->dobj.name);
 
@@ -5308,7 +5308,7 @@ getIndexes(Archive *fout, TableInfo tblinfo[], int numTables)
                        continue;
 
                if (g_verbose)
-                       write_msg(NULL, "reading indexes for table \"%s\".\"%s\"\n",
+                       write_msg(NULL, "reading indexes for table \"%s.%s\"\n",
                                          tbinfo->dobj.namespace->dobj.name,
                                          tbinfo->dobj.name);
 
@@ -5675,7 +5675,7 @@ getConstraints(Archive *fout, TableInfo tblinfo[], int numTables)
                        continue;
 
                if (g_verbose)
-                       write_msg(NULL, "reading foreign key constraints for table \"%s\".\"%s\"\n",
+                       write_msg(NULL, "reading foreign key constraints for table \"%s.%s\"\n",
                                          tbinfo->dobj.namespace->dobj.name,
                                          tbinfo->dobj.name);
 
@@ -6014,7 +6014,7 @@ getTriggers(Archive *fout, TableInfo tblinfo[], int numTables)
                        continue;
 
                if (g_verbose)
-                       write_msg(NULL, "reading triggers for table \"%s\".\"%s\"\n",
+                       write_msg(NULL, "reading triggers for table \"%s.%s\"\n",
                                          tbinfo->dobj.namespace->dobj.name,
                                          tbinfo->dobj.name);
 
@@ -6748,7 +6748,7 @@ getTableAttrs(Archive *fout, DumpOptions *dopt, TableInfo *tblinfo, int numTable
                 * 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\".\"%s\"\n",
+                       write_msg(NULL, "finding the columns and types of table \"%s.%s\"\n",
                                          tbinfo->dobj.namespace->dobj.name,
                                          tbinfo->dobj.name);
 
@@ -6961,7 +6961,7 @@ getTableAttrs(Archive *fout, DumpOptions *dopt, TableInfo *tblinfo, int numTable
                        int                     numDefaults;
 
                        if (g_verbose)
-                               write_msg(NULL, "finding default expressions of table \"%s\".\"%s\"\n",
+                               write_msg(NULL, "finding default expressions of table \"%s.%s\"\n",
                                                  tbinfo->dobj.namespace->dobj.name,
                                                  tbinfo->dobj.name);
 
@@ -7086,7 +7086,7 @@ getTableAttrs(Archive *fout, DumpOptions *dopt, TableInfo *tblinfo, int numTable
                        int                     numConstrs;
 
                        if (g_verbose)
-                               write_msg(NULL, "finding check constraints for table \"%s\".\"%s\"\n",
+                               write_msg(NULL, "finding check constraints for table \"%s.%s\"\n",
                                                  tbinfo->dobj.namespace->dobj.name,
                                                  tbinfo->dobj.name);
 
index aa3e20a2d5f466d834b3af803a37c9c35cb73456..80c3fa89e491b535eafafcabdbd02b48d48e3bf4 100644 (file)
@@ -1247,7 +1247,9 @@ repairDependencyLoop(DumpableObject **loop,
        }
        if (i >= nLoop)
        {
-               write_msg(NULL, "NOTICE: there are circular foreign-key constraints among these table(s):\n");
+               write_msg(NULL, ngettext("NOTICE: there are circular foreign-key constraints on this table:\n",
+                                                                "NOTICE: there are circular foreign-key constraints among these tables:\n",
+                                                                nLoop));
                for (i = 0; i < nLoop; i++)
                        write_msg(NULL, "  %s\n", loop[i]->name);
                write_msg(NULL, "You might not be able to restore the dump without using --disable-triggers or temporarily dropping the constraints.\n");