OSDN Git Service

More message munging and localization for pg_dump, especially the
authorPeter Eisentraut <peter_e@gmx.net>
Tue, 3 Jul 2001 20:21:50 +0000 (20:21 +0000)
committerPeter Eisentraut <peter_e@gmx.net>
Tue, 3 Jul 2001 20:21:50 +0000 (20:21 +0000)
--verbose messages, which had not been considered so far.  Output to the
terminal should okay now; comments written into the dump are still English
only, which may or may not be the desirable thing.

13 files changed:
src/bin/pg_dump/common.c
src/bin/pg_dump/de.po
src/bin/pg_dump/nls.mk
src/bin/pg_dump/pg_backup_archiver.c
src/bin/pg_dump/pg_backup_archiver.h
src/bin/pg_dump/pg_backup_custom.c
src/bin/pg_dump/pg_backup_db.c
src/bin/pg_dump/pg_backup_files.c
src/bin/pg_dump/pg_backup_tar.c
src/bin/pg_dump/pg_dump.c
src/bin/pg_dump/pg_dump.h
src/bin/pg_dump/pg_restore.c
src/include/c.h

index c384fa8..2fc9430 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/bin/pg_dump/common.c,v 1.56 2001/06/27 21:21:36 petere Exp $
+ *       $Header: /cvsroot/pgsql/src/bin/pg_dump/common.c,v 1.57 2001/07/03 20:21:47 petere Exp $
  *
  * Modifications - 6/12/96 - dave@bensoft.com - version 1.13.dhb.2
  *
@@ -179,7 +179,7 @@ findParentsByOid(TableInfo *tblinfo, int numTables,
                                                                   inhinfo[i].inhparent,
                                                                   oid);
 
-                                       exit(2);
+                                       exit_nicely();
                                }
                                (**parentIndexes)[j] = parentInd;
                                result[j++] = tblinfo[parentInd].relname;
@@ -219,7 +219,7 @@ parseNumericArray(const char *str, char **array, int arraysize)
                                if (argNum >= arraysize)
                                {
                                        write_msg(NULL, "parseNumericArray: too many numbers\n");
-                                       exit(2);
+                                       exit_nicely();
                                }
                                temp[j] = '\0';
                                array[argNum++] = strdup(temp);
@@ -234,7 +234,7 @@ parseNumericArray(const char *str, char **array, int arraysize)
                                j >= sizeof(temp) - 1)
                        {
                                write_msg(NULL, "parseNumericArray: bogus number\n");
-                               exit(2);
+                               exit_nicely();
                        }
                        temp[j++] = s;
                }
@@ -297,69 +297,57 @@ dumpSchema(Archive *fout,
        IndInfo    *indinfo = NULL;
 
        if (g_verbose)
-               fprintf(stderr, "%s reading user-defined types %s\n",
-                               g_comment_start, g_comment_end);
+               write_msg(NULL, "reading user-defined types\n");
        tinfo = getTypes(&numTypes);
 
        if (g_verbose)
-               fprintf(stderr, "%s reading user-defined functions %s\n",
-                               g_comment_start, g_comment_end);
+               write_msg(NULL, "reading user-defined functions\n");
        finfo = getFuncs(&numFuncs);
 
        if (g_verbose)
-               fprintf(stderr, "%s reading user-defined aggregates %s\n",
-                               g_comment_start, g_comment_end);
+               write_msg(NULL, "reading user-defined aggregate functions\n");
        agginfo = getAggregates(&numAggregates);
 
        if (g_verbose)
-               fprintf(stderr, "%s reading user-defined operators %s\n",
-                               g_comment_start, g_comment_end);
+               write_msg(NULL, "reading user-defined operators\n");
        oprinfo = getOperators(&numOperators);
 
        if (g_verbose)
-               fprintf(stderr, "%s reading user-defined tables %s\n",
-                               g_comment_start, g_comment_end);
+               write_msg(NULL, "reading user-defined tables\n");
        tblinfo = getTables(&numTables, finfo, numFuncs);
 
        if (g_verbose)
-               fprintf(stderr, "%s reading indexes information %s\n",
-                               g_comment_start, g_comment_end);
+               write_msg(NULL, "reading index information\n");
        indinfo = getIndexes(&numIndexes);
 
        if (g_verbose)
-               fprintf(stderr, "%s reading table inheritance information %s\n",
-                               g_comment_start, g_comment_end);
+               write_msg(NULL, "reading table inheritance information\n");
        inhinfo = getInherits(&numInherits);
 
        if (g_verbose)
-               fprintf(stderr, "%s finding the attribute names and types for each table %s\n",
-                               g_comment_start, g_comment_end);
+               write_msg(NULL, "finding the column names and types for each table\n");
        getTableAttrs(tblinfo, numTables);
 
        if (g_verbose)
-               fprintf(stderr, "%s flagging inherited attributes in subtables %s\n",
-                               g_comment_start, g_comment_end);
+               write_msg(NULL, "flagging inherited columns in subtables\n");
        flagInhAttrs(tblinfo, numTables, inhinfo, numInherits);
 
        if (!tablename && !dataOnly)
        {
                if (g_verbose)
-                       fprintf(stderr, "%s dumping out database comment %s\n",
-                                       g_comment_start, g_comment_end);
+                       write_msg(NULL, "dumping out database comment\n");
                dumpDBComment(fout);
        }
 
        if (!tablename && fout)
        {
                if (g_verbose)
-                       fprintf(stderr, "%s dumping out user-defined types %s\n",
-                                       g_comment_start, g_comment_end);
+                       write_msg(NULL, "dumping out user-defined types\n");
                dumpTypes(fout, finfo, numFuncs, tinfo, numTypes);
        }
 
        if (g_verbose)
-               fprintf(stderr, "%s dumping out tables %s\n",
-                               g_comment_start, g_comment_end);
+               write_msg(NULL, "dumping out tables\n");
 
        dumpTables(fout, tblinfo, numTables, indinfo, numIndexes, inhinfo, numInherits,
           tinfo, numTypes, tablename, aclsSkip, oids, schemaOnly, dataOnly);
@@ -367,40 +355,35 @@ dumpSchema(Archive *fout,
        if (fout && !dataOnly)
        {
                if (g_verbose)
-                       fprintf(stderr, "%s dumping out indexes %s\n",
-                                       g_comment_start, g_comment_end);
+                       write_msg(NULL, "dumping out indexes\n");
                dumpIndexes(fout, indinfo, numIndexes, tblinfo, numTables, tablename);
        }
 
        if (!tablename && !dataOnly)
        {
                if (g_verbose)
-                       fprintf(stderr, "%s dumping out user-defined procedural languages %s\n",
-                                       g_comment_start, g_comment_end);
+                       write_msg(NULL, "dumping out user-defined procedural languages\n");
                dumpProcLangs(fout, finfo, numFuncs, tinfo, numTypes);
        }
 
        if (!tablename && !dataOnly)
        {
                if (g_verbose)
-                       fprintf(stderr, "%s dumping out user-defined functions %s\n",
-                                       g_comment_start, g_comment_end);
+                       write_msg(NULL, "dumping out user-defined functions\n");
                dumpFuncs(fout, finfo, numFuncs, tinfo, numTypes);
        }
 
        if (!tablename && !dataOnly)
        {
                if (g_verbose)
-                       fprintf(stderr, "%s dumping out user-defined aggregates %s\n",
-                                       g_comment_start, g_comment_end);
+                       write_msg(NULL, "dumping out user-defined aggregate functions\n");
                dumpAggs(fout, agginfo, numAggregates, tinfo, numTypes);
        }
 
        if (!tablename && !dataOnly)
        {
                if (g_verbose)
-                       fprintf(stderr, "%s dumping out user-defined operators %s\n",
-                                       g_comment_start, g_comment_end);
+                       write_msg(NULL, "dumping out user-defined operators\n");
                dumpOprs(fout, oprinfo, numOperators, tinfo, numTypes);
        }
 
@@ -490,7 +473,7 @@ flagInhAttrs(TableInfo *tblinfo, int numTables,
                                        /* shouldn't happen unless findParentsByOid is broken */
                                        write_msg(NULL, "failed sanity check, table \"%s\" not found by flagInhAttrs\n",
                                                          tblinfo[i].parentRels[k]);
-                                       exit(2);
+                                       exit_nicely();
                                };
 
                                inhAttrInd = strInArray(tblinfo[i].attnames[j],
index 1d357cf..cefe951 100644 (file)
@@ -1,15 +1,15 @@
 # German message translation file for pg_dump and friends
 # Peter Eisentraut <peter_e@gmx.net>, 2001.
 #
-# $Header: /cvsroot/pgsql/src/bin/pg_dump/Attic/de.po,v 1.1 2001/06/27 21:21:37 petere Exp $
+# $Header: /cvsroot/pgsql/src/bin/pg_dump/Attic/de.po,v 1.2 2001/07/03 20:21:48 petere Exp $
 #
 # Use these quotes: »%s«
 #
 msgid ""
 msgstr ""
 "Project-Id-Version: pg_dump (PostgreSQL) 7.2\n"
-"POT-Creation-Date: 2001-06-27 21:58+0200\n"
-"PO-Revision-Date: 2001-06-27 22:02+0200\n"
+"POT-Creation-Date: 2001-07-03 22:11+0200\n"
+"PO-Revision-Date: 2001-07-03 21:05+0200\n"
 "Last-Translator: Peter Eisentraut <peter_e@gmx.net>\n"
 "Language-Team: German <de@li.org>\n"
 "MIME-Version: 1.0\n"
@@ -118,47 +118,70 @@ msgstr ""
 "\n"
 "Berichten Sie Fehler an <pgsql-bugs@postgresql.org>."
 
-#: pg_dump.c:380
+#: pg_backup_archiver.c:1265 pg_dump.c:322
+msgid "*** aborted because of error\n"
+msgstr "*** abgebrochen wegen Fehler\n"
+
+#: pg_dump.c:349
+#, c-format
+msgid "dumping out the contents of table %s\n"
+msgstr ""
+
+#: pg_dump.c:382
 #, c-format
 msgid "SQL command to dump the contents of table \"%s\" failed\n"
 msgstr ""
 
-#: pg_dump.c:382 pg_dump.c:478 pg_dump.c:511 pg_dump.c:1183
+#: pg_dump.c:384 pg_dump.c:480 pg_dump.c:513 pg_dump.c:1174
 #, c-format
 msgid "Error message from server: %s"
 msgstr "Fehlermeldung vom Server: %s"
 
-#: pg_dump.c:383 pg_dump.c:394 pg_dump.c:479 pg_dump.c:512 pg_dump.c:1184
+#: pg_dump.c:385 pg_dump.c:396 pg_dump.c:481 pg_dump.c:514 pg_dump.c:1175
 #, c-format
 msgid "The command was: %s\n"
 msgstr "Die Anweisung war: %s\n"
 
-#: pg_dump.c:390
+#: pg_dump.c:392
 #, c-format
 msgid "SQL command to dump the contents of table \"%s\" executed abnormally.\n"
 msgstr ""
 
-#: pg_dump.c:392
+#: pg_dump.c:394
 #, c-format
 msgid "The server returned status %d when %d was expected.\n"
 msgstr "Der Server gab Status %d zurück, aber %d wurde erwartet.\n"
 
-#: pg_dump.c:477
+#: pg_dump.c:479
 #, c-format
 msgid ""
 "SQL command to dump the contents of table \"%s\" failed: PQendcopy() "
 "failed.\n"
 msgstr ""
 
-#: pg_dump.c:510
+#: pg_dump.c:512
 msgid "dumpClasses(): SQL command failed\n"
 msgstr "dumpClasses(): SQL-Anweisung schlug fehl\n"
 
-#: pg_dump.c:924 pg_restore.c:251
-msgid "Username: "
+#: pg_dump.c:643
+#, c-format
+msgid "preparing to dump the contents of all %d tables/sequences\n"
+msgstr ""
+
+#: pg_dump.c:645
+msgid "preparing to dump the contents of only one table/sequence\n"
+msgstr ""
+
+#: pg_dump.c:662
+#, c-format
+msgid "preparing to dump the contents of table %s\n"
+msgstr ""
+
+#: pg_dump.c:921 pg_restore.c:251
+msgid "User name: "
 msgstr "Benutzername: "
 
-#: pg_dump.c:955
+#: pg_dump.c:947
 #, c-format
 msgid ""
 "%s was compiled without support for long options.\n"
@@ -167,12 +190,12 @@ msgstr ""
 "%s wurde ohne Unterstützung für lange Optionen kompiliert.\n"
 "Verwenden Sie --help für Hilfe.\n"
 
-#: pg_dump.c:962 pg_restore.c:270
+#: pg_dump.c:954 pg_restore.c:270
 #, c-format
 msgid "Try '%s --help' for more information.\n"
 msgstr "Versuchen Sie »%s --help« für weitere Informationen.\n"
 
-#: pg_dump.c:970
+#: pg_dump.c:962
 #, c-format
 msgid ""
 "%s: too many command line options (first is '%s')\n"
@@ -181,450 +204,570 @@ msgstr ""
 "%s: zu Viele Kommandozeilenoptionen (die Erste ist »%s«)\n"
 "Versuchen Sie »%s --help« für weitere Informationen.\n"
 
-#: pg_backup_db.c:353 pg_dump.c:983
+#: pg_backup_db.c:352 pg_dump.c:975
 msgid "no database name specified\n"
 msgstr "kein Datenbankname angegeben\n"
 
-#: pg_dump.c:989
-msgid "'Schema only' and 'data only' are incompatible options.\n"
+#: pg_dump.c:981
+msgid ""
+"The options \"schema only\" (-s) and \"data only\" (-a) cannot be used "
+"together.\n"
 msgstr ""
 
-#: pg_dump.c:995
+#: pg_dump.c:987
 msgid "BLOB output is not supported for a single table.\n"
 msgstr ""
 
-#: pg_dump.c:996
+#: pg_dump.c:988
 msgid "Use all tables or a full dump instead.\n"
 msgstr ""
 
-#: pg_dump.c:1002
+#: pg_dump.c:994
 msgid "INSERT (-d, -D) and OID (-o) options cannot be used together.\n"
 msgstr ""
 "Die Optionen INSERT (-d, -D) und OID (-o) können nicht zusammen verwendet "
 "werden.\n"
 
-#: pg_dump.c:1003
+#: pg_dump.c:995
 msgid "(The INSERT command cannot set oids.)\n"
 msgstr "(Die INSERT-Anweisung kann Oids nicht setzen.)\n"
 
-#: pg_dump.c:1009
+#: pg_dump.c:1001
 msgid "BLOB output is not supported for plain text dump files.\n"
 msgstr ""
 
-#: pg_dump.c:1010
+#: pg_dump.c:1002
 msgid "(Use a different output format.)\n"
 msgstr ""
 
-#: pg_dump.c:1040
+#: pg_dump.c:1032
 #, c-format
 msgid "invalid output format '%s' specified\n"
 msgstr "ungültiges Ausgabeformat »%s« angegeben\n"
 
-#: pg_dump.c:1046
+#: pg_dump.c:1038
 #, c-format
 msgid "could not open output file %s for writing\n"
 msgstr "konnte Ausgabedatei %s nicht zum Schreiben öffnen\n"
 
-#: pg_dump.c:1069
+#: pg_dump.c:1061
 #, c-format
 msgid "BEGIN command failed: %s"
 msgstr "BEGIN-Anweisung schlug fehl: %s"
 
-#: pg_dump.c:1075
+#: pg_dump.c:1067
 #, c-format
 msgid "could not set transaction isolation level to serializable: %s"
 msgstr ""
 
-#: pg_dump.c:1182
+#: pg_dump.c:1086
+#, c-format
+msgid "last built-in oid is %u\n"
+msgstr "letzte eingebaute Oid ist %u\n"
+
+#: pg_dump.c:1162
+msgid "saving database definition\n"
+msgstr "sichere Datenbankdefinition\n"
+
+#: pg_dump.c:1173
 msgid "SQL command failed\n"
 msgstr "SQL-Anweisung schlug fehl\n"
 
-#: pg_dump.c:1192
+#: pg_dump.c:1183
 #, c-format
 msgid "missing pg_database entry for database \"%s\"\n"
 msgstr "fehlender pg_database-Eintrag für Datenbank »%s«\n"
 
-#: pg_dump.c:1198
+#: pg_dump.c:1189
 #, c-format
 msgid ""
 "query returned more than one (%d) pg_database entry for database \"%s\"\n"
 msgstr ""
+"Abfrage ergab mehr als einen (%d) pg_database-Eintrag für Datenbank »%s«\n"
+
+#: pg_dump.c:1231
+msgid "saving BLOBs\n"
+msgstr ""
 
-#: pg_dump.c:1253
+#: pg_dump.c:1244
 #, c-format
 msgid "dumpBlobs(): cursor declaration failed: %s"
 msgstr ""
 
-#: pg_dump.c:1268
+#: pg_dump.c:1259
 #, c-format
 msgid "dumpBlobs(): fetch from cursor failed: %s"
 msgstr ""
 
-#: pg_dump.c:1281
+#: pg_dump.c:1272
 #, c-format
 msgid "dumpBlobs(): could not open large object: %s"
 msgstr ""
 
-#: pg_dump.c:1294
+#: pg_dump.c:1285
 #, c-format
 msgid "dumpBlobs(): error reading large object: %s"
 msgstr ""
 
-#: pg_dump.c:1379
+#: pg_dump.c:1370
 #, c-format
 msgid "query to obtain list of data types failed: %s"
 msgstr ""
 
-#: pg_dump.c:1423
+#: pg_dump.c:1414
 #, c-format
 msgid "WARNING: owner of data type %s appears to be invalid\n"
 msgstr "WARNUNG: Eigentümer des Datentypen %s scheint ungültig zu sein\n"
 
-#: pg_dump.c:1497
+#: pg_dump.c:1488
 #, c-format
 msgid "query to obtain list of operators failed: %s"
-msgstr ""
+msgstr "Abfrage um Liste der Operatoren zu ermitteln schlug fehl: %s"
 
-#: pg_dump.c:1539
+#: pg_dump.c:1530
 #, c-format
 msgid "WARNING: owner of operator \"%s\" appears to be invalid\n"
 msgstr "WARNUNG: Eigentümer des Operatoren »%s« scheint ungültig zu sein\n"
 
-#: pg_dump.c:1861
+#: pg_dump.c:1852
 #, c-format
-msgid "query to obtain list of aggregate functions failed: %s\n"
-msgstr ""
+msgid "query to obtain list of aggregate functions failed: %s"
+msgstr "Abfrage um Liste der Aggregatfunktionen zu ermitteln schlug fehl: %s"
 
-#: pg_dump.c:1892
+#: pg_dump.c:1883
 #, c-format
 msgid "WARNING: owner of aggregate function \"%s\" appears to be invalid\n"
 msgstr ""
+"WARNUNG: Eigentümer der Aggregatfunktion »%s« scheint ungültig zu sein\n"
 
-#: pg_dump.c:1962
+#: pg_dump.c:1953
 #, c-format
 msgid "query to obtain list of functions failed: %s"
 msgstr "Abfrage um Liste der Funktionen zu ermitteln schlug fehl: %s"
 
-#: pg_dump.c:2005
+#: pg_dump.c:1996
 #, c-format
 msgid "WARNING: owner of function \"%s\" appears to be invalid\n"
-msgstr ""
+msgstr "WARNUNG: Eigentümer der Funktion »%s« scheint ungültig zu sein\n"
 
-#: pg_dump.c:2010
+#: pg_dump.c:2001
 #, c-format
 msgid ""
 "failed sanity check: function %s has more than %d (namely %d) arguments\n"
 msgstr ""
 
-#: pg_dump.c:2105
+#: pg_dump.c:2096
 #, c-format
 msgid "query to obtain list of tables failed: %s"
 msgstr "Abfrage um Liste der Tabellen zu ermitteln schlug fehl: %s"
 
-#: pg_dump.c:2136
+#: pg_dump.c:2127
 #, c-format
 msgid "WARNING: owner of table \"%s\" appears to be invalid\n"
-msgstr ""
+msgstr "WARNUNG: Eigentümer der Tabelle »%s« scheint ungültig zu sein\n"
 
-#: pg_dump.c:2156
+#: pg_dump.c:2147
 #, c-format
 msgid "query to obtain definition of view \"%s\" failed: %s"
-msgstr ""
+msgstr "Abfrage um die Definition der Sicht »%s« zu ermitteln schlug fehl: %s"
 
-#: pg_dump.c:2164
+#: pg_dump.c:2155
 #, c-format
 msgid "query to obtain definition of view \"%s\" returned no data\n"
 msgstr ""
+"Abfrage um die Definition der Sicht »%s« zu ermitteln lieferte keine Daten\n"
 
-#: pg_dump.c:2167
+#: pg_dump.c:2158
 #, c-format
 msgid ""
 "query to obtain definition of view \"%s\" returned more than one definition\n"
 msgstr ""
+"Abfrage um die Definition der Sicht »%s« zu ermitteln lieferte mehr als eine "
+"Definition\n"
 
-#: pg_dump.c:2174
+#: pg_dump.c:2165
 #, c-format
 msgid "query to obtain definition of view \"%s\" returned NULL oid\n"
 msgstr ""
 
-#: pg_dump.c:2184
+#: pg_dump.c:2175
 #, c-format
 msgid "definition of view \"%s\" appears to be empty (length zero)\n"
+msgstr "Definition der Sicht »%s« scheint leer zu sein (Länge null)\n"
+
+#: pg_dump.c:2200
+#, c-format
+msgid "finding CHECK constraints for table %s\n"
 msgstr ""
 
-#: pg_dump.c:2232
+#: pg_dump.c:2221
 #, c-format
 msgid "query to obtain check constraints failed: %s"
 msgstr ""
 
-#: pg_dump.c:2238
+#: pg_dump.c:2227
 #, c-format
 msgid "expected %d check constraints on table \"%s\" but found %d\n"
 msgstr ""
 
-#: pg_dump.c:2240
+#: pg_dump.c:2229
 msgid "(The system catalogs might be corrupted.)\n"
 msgstr ""
 
-#: pg_dump.c:2281
+#: pg_dump.c:2270
 #, c-format
 msgid "query to obtain primary key of table \"%s\" failed: %s"
 msgstr ""
 
-#: pg_dump.c:2288
+#: pg_dump.c:2277
 #, c-format
 msgid ""
 "query to obtain primary key of table \"%s\" produced more than one result\n"
 msgstr ""
 
-#: pg_dump.c:2338
+#: pg_dump.c:2327
 #, c-format
 msgid "query to obtain name of primary key of table \"%s\" failed: %s"
 msgstr ""
 
-#: pg_dump.c:2346
+#: pg_dump.c:2335
 #, c-format
 msgid ""
 "query to obtain name of primary key of table \"%s\" did not return exactly "
 "one result\n"
 msgstr ""
 
-#: pg_dump.c:2354
+#: pg_dump.c:2343
 #, c-format
 msgid "name of primary key of table \"%s\" returned NULL value\n"
 msgstr ""
 
-#: pg_backup_archiver.c:620 pg_backup_archiver.c:1030
-#: pg_backup_archiver.c:1150 pg_backup_archiver.c:1436
-#: pg_backup_archiver.c:1578 pg_backup_archiver.c:1607 pg_backup_custom.c:149
+#: pg_backup_archiver.c:621 pg_backup_archiver.c:1031
+#: pg_backup_archiver.c:1151 pg_backup_archiver.c:1439
+#: pg_backup_archiver.c:1581 pg_backup_archiver.c:1610 pg_backup_custom.c:149
 #: pg_backup_custom.c:154 pg_backup_custom.c:169 pg_backup_custom.c:564
-#: pg_backup_db.c:284 pg_backup_db.c:376 pg_backup_tar.c:992 pg_dump.c:2363
+#: pg_backup_db.c:283 pg_backup_db.c:375 pg_backup_tar.c:992 pg_dump.c:2352
 msgid "out of memory\n"
 msgstr "Speicher aufgebraucht\n"
 
-#: pg_dump.c:2409
+#: pg_dump.c:2379
+#, c-format
+msgid "finding triggers for table %s\n"
+msgstr ""
+
+#: pg_dump.c:2395
 #, c-format
 msgid "query to obtain list of triggers failed: %s"
 msgstr ""
 
-#: pg_dump.c:2415
+#: pg_dump.c:2401
 #, c-format
 msgid "expected %d triggers on table \"%s\" but found %d\n"
 msgstr ""
 
-#: pg_dump.c:2495
+#: pg_dump.c:2481
 #, c-format
 msgid "query to obtain procedure name for trigger \"%s\" failed: %s"
 msgstr ""
 
-#: pg_dump.c:2504
+#: pg_dump.c:2490
 #, c-format
 msgid ""
 "query to obtain procedure name for trigger \"%s\" did not return exactly one "
 "result\n"
 msgstr ""
 
-#: pg_dump.c:2567
+#: pg_dump.c:2553
 #, c-format
 msgid ""
 "query produced NULL referenced table name for trigger \"%s\" on table \"%s"
 "\" (oid was %s)\n"
 msgstr ""
 
-#: pg_dump.c:2597
+#: pg_dump.c:2583
 #, c-format
 msgid "bad argument string (%s) for trigger \"%s\" on table \"%s\"\n"
 msgstr ""
 
-#: pg_dump.c:2685
+#: pg_dump.c:2671
 #, c-format
 msgid "query to obtain inheritance relationships failed: %s"
 msgstr ""
 
-#: pg_dump.c:2788
+#: pg_dump.c:2735
+#, c-format
+msgid "finding the columns and types for table %s\n"
+msgstr ""
+
+#: pg_dump.c:2772
 #, c-format
 msgid "query to get table columns failed: %s"
 msgstr ""
 
-#: pg_dump.c:2820
+#: pg_dump.c:2804
 #, c-format
 msgid "query produced NULL name for data type of column %d of table %s\n"
 msgstr ""
 
-#: pg_dump.c:2855
+#: pg_dump.c:2826
+#, c-format
+msgid "finding DEFAULT expression for column %s\n"
+msgstr ""
+
+#: pg_dump.c:2837
 #, c-format
 msgid "query to get column default value failed: %s"
 msgstr ""
 
-#: pg_dump.c:2864
+#: pg_dump.c:2846
 #, c-format
 msgid ""
 "query to get default value for column \"%s\" returned %d rows; expected 1\n"
 msgstr ""
 
-#: pg_dump.c:2937
+#: pg_dump.c:2919
 #, c-format
 msgid "query to obtain list of indexes failed: %s"
 msgstr ""
 
-#: pg_dump.c:3017
+#: pg_dump.c:2999
 #, c-format
 msgid "query to get comment on oid %s failed: %s"
 msgstr ""
 
-#: pg_dump.c:3072
+#: pg_dump.c:3054
 #, c-format
 msgid "query to get database oid failed: %s"
 msgstr ""
 
-#: pg_dump.c:3172
+#: pg_dump.c:3154
 #, c-format
-msgid "Notice: array type %s - type for elements (oid %s) is not dumped.\n"
+msgid "notice: array type %s - type for elements (oid %s) is not dumped\n"
 msgstr ""
 
-#: pg_dump.c:3239
+#: pg_dump.c:3221
 #, c-format
 msgid "query to obtain list of procedural languages failed: %s"
 msgstr ""
 
-#: pg_dump.c:3267
+#: pg_dump.c:3249
 #, c-format
 msgid "handler procedure for procedural language %s not found\n"
 msgstr ""
 
-#: pg_dump.c:3357
+#: pg_dump.c:3339
 #, c-format
 msgid "query to get name of procedural language failed: %s"
 msgstr ""
 
-#: pg_dump.c:3364
+#: pg_dump.c:3346
 #, c-format
 msgid "procedural language for function %s not found\n"
 msgstr ""
 
-#: pg_dump.c:3406 pg_dump.c:3435
+#: pg_dump.c:3388 pg_dump.c:3417
+#, c-format
+msgid "WARNING: function \"%s\" not dumped\n"
+msgstr ""
+
+#: pg_dump.c:3391
+#, c-format
+msgid "reason: data type name of argument %d (oid %s) not found\n"
+msgstr ""
+
+#: pg_dump.c:3420
+#, c-format
+msgid "reason: name of return data type (oid %s) not found\n"
+msgstr ""
+
+#: pg_dump.c:3528 pg_dump.c:3544 pg_dump.c:3558 pg_dump.c:3572 pg_dump.c:3592
+#: pg_dump.c:3606
+#, c-format
+msgid "WARNING: operator \"%s\" (oid %s) not dumped\n"
+msgstr ""
+
+#: pg_dump.c:3530
+#, c-format
+msgid "reason: oprleft (oid %s) not found\n"
+msgstr ""
+
+#: pg_dump.c:3546
+#, c-format
+msgid "reason: oprright (oid %s) not found\n"
+msgstr ""
+
+#: pg_dump.c:3560
+#, c-format
+msgid "reason: oprcom (oid %s) not found\n"
+msgstr ""
+
+#: pg_dump.c:3574
 #, c-format
-msgid "Notice: function \"%s\" not dumped\n"
+msgid "reason: oprnegate (oid %s) not found\n"
 msgstr ""
 
-#: pg_dump.c:3409
+#: pg_dump.c:3594
 #, c-format
-msgid "Reason: data type name of argument %d (oid %s) not found\n"
+msgid "reason: oprlsortop (oid %s) not found\n"
 msgstr ""
 
-#: pg_dump.c:3438
+#: pg_dump.c:3608
 #, c-format
-msgid "Reason: name of return data type (oid %s) not found\n"
+msgid "reason: oprrsortop (oid %s) not found\n"
 msgstr ""
 
-#: pg_dump.c:4108
+#: pg_dump.c:3673
+#, c-format
+msgid ""
+"WARNING: aggregate function %s could not be dumped correctly for this "
+"database version; ignored\n"
+msgstr ""
+
+#: pg_dump.c:3687 pg_dump.c:3704
+#, c-format
+msgid "WARNING: aggregate function \"%s\" (oid %s) not dumped\n"
+msgstr ""
+
+#: pg_dump.c:3689
+#, c-format
+msgid "reason: aggbasetype (oid %s) not found\n"
+msgstr ""
+
+#: pg_dump.c:3706
+#, c-format
+msgid "reason: aggtranstype (oid %s) not found\n"
+msgstr ""
+
+#: pg_dump.c:3870
+#, c-format
+msgid "could not parse ACL list ('%s') for relation %s\n"
+msgstr ""
+
+#: pg_dump.c:4111
 #, c-format
 msgid ""
 "dumpTables(): failed sanity check, could not find index (%s) for primary key "
 "constraint\n"
 msgstr ""
 
-#: pg_dump.c:4232
+#: pg_dump.c:4235
 #, c-format
 msgid "getAttrName(): invalid column number %d for table %s\n"
 msgstr ""
 
-#: pg_dump.c:4268
+#: pg_dump.c:4271
 #, c-format
 msgid "dumpIndexes(): failed sanity check, table %s was not found\n"
 msgstr ""
 
-#: pg_dump.c:4322
+#: pg_dump.c:4325
 #, c-format
 msgid "query to get function name of oid %s failed: %s"
 msgstr ""
 
-#: pg_dump.c:4331
+#: pg_dump.c:4334
 #, c-format
 msgid "query to get function name of oid %s returned %d rows; expected 1\n"
 msgstr ""
 
-#: pg_dump.c:4356
+#: pg_dump.c:4359
 #, c-format
 msgid "query to get operator class name of oid %u failed: %s"
 msgstr ""
 
-#: pg_dump.c:4365
+#: pg_dump.c:4368
 #, c-format
 msgid ""
 "query to get operator class name of oid %u returned %d rows; expected 1\n"
 msgstr ""
 
-#: pg_dump.c:4376
+#: pg_dump.c:4379
 #, c-format
 msgid "There must be exactly one OpClass for functional index \"%s\".\n"
 msgstr ""
 
-#: pg_dump.c:4400
+#: pg_dump.c:4403
 #, c-format
 msgid "no operator class found for column \"%s\" of index \"%s\"\n"
 msgstr ""
 
-#: pg_dump.c:4542
+#: pg_dump.c:4545
 #, c-format
 msgid "could not create pgdump_oid table: %s"
-msgstr ""
+msgstr "konnte Tabelle pgdump_oid nicht erstellen: %s"
 
-#: pg_dump.c:4550
+#: pg_dump.c:4553
 #, c-format
 msgid "could not insert into pgdump_oid table: %s"
-msgstr ""
+msgstr "konnte nicht in Tabelle pgdump_oid einfügen: %s"
 
-#: pg_dump.c:4556
+#: pg_dump.c:4559
 msgid "inserted invalid oid\n"
-msgstr ""
+msgstr "ungültige Oid eingefügt\n"
 
-#: pg_dump.c:4564
+#: pg_dump.c:4567
 #, c-format
 msgid "could not drop pgdump_oid table: %s"
-msgstr ""
+msgstr "konnte Tabelle pgdump_oid nicht entfernen: %s"
+
+#: pg_dump.c:4572
+#, c-format
+msgid "maximum system oid is %u\n"
+msgstr "höchste System-Oid ist %u\n"
 
-#: pg_dump.c:4604
+#: pg_dump.c:4606
 #, c-format
 msgid "error in finding the last system oid: %s"
 msgstr ""
 
-#: pg_dump.c:4610
+#: pg_dump.c:4612
 msgid "missing pg_database entry for this database\n"
-msgstr ""
+msgstr "fehlender pg_database-Eintrag für diese Datenbank\n"
 
-#: pg_dump.c:4615
+#: pg_dump.c:4617
 msgid "found more than one pg_database entry for this database\n"
-msgstr ""
+msgstr "mehr als einen pg_database-Eintrag für diese Datenbank gefunden\n"
 
-#: pg_dump.c:4642
+#: pg_dump.c:4644
 #, c-format
 msgid "error in finding the template1 database: %s"
-msgstr ""
+msgstr "Fehler beim Finden der Datenbank template1: %s"
 
-#: pg_dump.c:4648
+#: pg_dump.c:4650
 msgid "could not find template1 database entry in the pg_database table\n"
 msgstr ""
+"konnte Eintrag für Datenbank template1 nicht in der Tabelle pg_database "
+"finden\n"
 
-#: pg_dump.c:4653
+#: pg_dump.c:4655
 msgid "found more than one template1 database entry in the pg_database table\n"
 msgstr ""
+"mehr als ein Eintrag für Datenbank template1 in der Tabelle pg_database "
+"gefunden\n"
 
-#: pg_dump.c:4684
+#: pg_dump.c:4686
 #, c-format
 msgid "query to get data of sequence \"%s\" failed: %s"
 msgstr ""
 
-#: pg_dump.c:4690
+#: pg_dump.c:4692
 #, c-format
 msgid "query to get data of sequence \"%s\" returned %d rows (expected 1)\n"
 msgstr ""
 
-#: pg_dump.c:4697
+#: pg_dump.c:4699
 #, c-format
 msgid "query to get data of sequence \"%s\" returned name \"%s\"\n"
 msgstr ""
 
+#: pg_dump.c:4774
+msgid "dumping out triggers\n"
+msgstr ""
+
+#: pg_dump.c:4808
+msgid "dumping out rules\n"
+msgstr ""
+
 #: pg_dump.c:4840
 #, c-format
 msgid "query to get rules associated with table \"%s\" failed: %s"
@@ -653,11 +796,83 @@ msgstr ""
 msgid "parseNumericArray: bogus number\n"
 msgstr ""
 
-#: common.c:491
+#: common.c:300
+msgid "reading user-defined types\n"
+msgstr "lese benutzerdefinierte Typen\n"
+
+#: common.c:304
+msgid "reading user-defined functions\n"
+msgstr "lese benutzerdefinierte Funktionen\n"
+
+#: common.c:308
+msgid "reading user-defined aggregate functions\n"
+msgstr "lese benutzerdefinierte Aggregatfunktionen\n"
+
+#: common.c:312
+msgid "reading user-defined operators\n"
+msgstr "lese benutzerdefinierte Operatoren\n"
+
+#: common.c:316
+msgid "reading user-defined tables\n"
+msgstr "lese benutzerdefinierte Tabellen\n"
+
+#: common.c:320
+msgid "reading index information\n"
+msgstr "lese Indexinformationen\n"
+
+#: common.c:324
+msgid "reading table inheritance information\n"
+msgstr "lese Tabellenvererbungsinformationen\n"
+
+#: common.c:328
+msgid "finding the column names and types for each table\n"
+msgstr "finde Spaltennamen und -typen für jede Tabelle\n"
+
+#: common.c:332
+msgid "flagging inherited columns in subtables\n"
+msgstr ""
+
+#: common.c:338
+msgid "dumping out database comment\n"
+msgstr ""
+
+#: common.c:345
+msgid "dumping out user-defined types\n"
+msgstr ""
+
+#: common.c:350
+msgid "dumping out tables\n"
+msgstr ""
+
+#: common.c:358
+msgid "dumping out indexes\n"
+msgstr ""
+
+#: common.c:365
+msgid "dumping out user-defined procedural languages\n"
+msgstr ""
+
+#: common.c:372
+msgid "dumping out user-defined functions\n"
+msgstr ""
+
+#: common.c:379
+msgid "dumping out user-defined aggregate functions\n"
+msgstr ""
+
+#: common.c:386
+msgid "dumping out user-defined operators\n"
+msgstr ""
+
+#: common.c:474
 #, c-format
 msgid "failed sanity check, table \"%s\" not found by flagInhAttrs\n"
 msgstr ""
 
+#: pg_backup_archiver.c:94
+msgid "archiver"
+msgstr "Archivierer"
+
 #: pg_backup_archiver.c:149
 msgid "could not close the output file in CloseArchive\n"
 msgstr ""
@@ -666,10 +881,18 @@ msgstr ""
 msgid "-C and -R are incompatible options\n"
 msgstr ""
 
+#: pg_backup_archiver.c:173
+msgid "connecting to database for restore\n"
+msgstr ""
+
 #: pg_backup_archiver.c:175
 msgid "direct database connections are not supported in pre-1.3 archives\n"
 msgstr ""
 
+#: pg_backup_archiver.c:222
+msgid "implied data-only restore\n"
+msgstr ""
+
 #: pg_backup_archiver.c:227
 msgid ""
 "WARNING:\n"
@@ -685,200 +908,277 @@ msgstr ""
 "Trigger\n"
 "  enthält.\n"
 
-#: pg_backup_archiver.c:275 pg_backup_archiver.c:277
+#: pg_backup_archiver.c:252
+#, c-format
+msgid "dropping %s %s\n"
+msgstr "entferne %s %s\n"
+
+#: pg_backup_archiver.c:276 pg_backup_archiver.c:278
 #, c-format
 msgid "warning from original dump file: %s\n"
 msgstr ""
 
-#: pg_backup_archiver.c:317
+#: pg_backup_archiver.c:288
+#, c-format
+msgid "creating %s %s\n"
+msgstr "erstelle %s %s\n"
+
+#: pg_backup_archiver.c:295
+#, c-format
+msgid "connecting to new database %s as user %s\n"
+msgstr ""
+
+#: pg_backup_archiver.c:318
 msgid ""
 "unable to restore from compressed archive (not configured for compression "
 "support)\n"
 msgstr ""
 
-#: pg_backup_archiver.c:335
+#: pg_backup_archiver.c:336
 msgid "WARNING: skipping BLOB restoration\n"
 msgstr ""
 
-#: pg_backup_archiver.c:595
+#: pg_backup_archiver.c:350
+#, c-format
+msgid "restoring data for table %s\n"
+msgstr ""
+
+#: pg_backup_archiver.c:371
+#, c-format
+msgid "executing %s %s\n"
+msgstr ""
+
+#: pg_backup_archiver.c:395
+#, c-format
+msgid "checking whether we loaded %s\n"
+msgstr ""
+
+#: pg_backup_archiver.c:401
+#, c-format
+msgid "fixing up BLOB reference for %s\n"
+msgstr ""
+
+#: pg_backup_archiver.c:406
+#, c-format
+msgid "ignoring BLOB cross-references for %s %s\n"
+msgstr ""
+
+#: pg_backup_archiver.c:493
+msgid "disabling triggers\n"
+msgstr "schalte Trigger aus\n"
+
+#: pg_backup_archiver.c:553
+msgid "enabling triggers\n"
+msgstr "schalte Trigger ein\n"
+
+#: pg_backup_archiver.c:596
 msgid ""
 "WriteData cannot be called outside the context of a DataDumper routine\n"
 msgstr ""
 
-#: pg_backup_archiver.c:715
+#: pg_backup_archiver.c:716
 msgid "BLOB output not supported in chosen format\n"
 msgstr ""
 
-#: pg_backup_archiver.c:779
+#: pg_backup_archiver.c:756 pg_backup_archiver.c:823
+msgid "committing BLOB transactions\n"
+msgstr ""
+
+#: pg_backup_archiver.c:763
+#, c-format
+msgid "restored %d BLOBs\n"
+msgstr ""
+
+#: pg_backup_archiver.c:780
 msgid "cannot restore BLOBs without a database connection"
 msgstr ""
 
-#: pg_backup_archiver.c:798
+#: pg_backup_archiver.c:791
+msgid "starting BLOB transactions\n"
+msgstr ""
+
+#: pg_backup_archiver.c:799
 msgid "could not create BLOB\n"
 msgstr ""
 
-#: pg_backup_archiver.c:806
+#: pg_backup_archiver.c:801
+#, c-format
+msgid "restoring BLOB oid %u as %u\n"
+msgstr ""
+
+#: pg_backup_archiver.c:807
 msgid "could not open BLOB\n"
 msgstr ""
 
-#: pg_backup_archiver.c:946
+#: pg_backup_archiver.c:947
 msgid "could not open TOC file\n"
 msgstr ""
 
-#: pg_backup_archiver.c:967
+#: pg_backup_archiver.c:968
 #, c-format
 msgid "WARNING: line ignored: %s\n"
 msgstr "WARNUNG: Zeile ignoriert: %s\n"
 
-#: pg_backup_archiver.c:974
+#: pg_backup_archiver.c:975
 #, c-format
 msgid "could not find entry for id %d\n"
 msgstr ""
 
-#: pg_backup_archiver.c:983 pg_backup_files.c:158 pg_backup_files.c:443
+#: pg_backup_archiver.c:984 pg_backup_files.c:158 pg_backup_files.c:443
 #, c-format
 msgid "could not close TOC file: %s\n"
 msgstr ""
 
-#: pg_backup_archiver.c:1099 pg_backup_files.c:132
+#: pg_backup_archiver.c:1100 pg_backup_files.c:132
 #, c-format
 msgid "could not open output file: %s\n"
 msgstr "konnte Ausgabedatei nicht öffnen: %s\n"
 
-#: pg_backup_archiver.c:1115
+#: pg_backup_archiver.c:1116
 #, c-format
 msgid "could not close output file: %s\n"
 msgstr "konnte Ausgabedatei nicht schließen: %s\n"
 
-#: pg_backup_archiver.c:1198
+#: pg_backup_archiver.c:1197
+#, c-format
+msgid "wrote %d bytes of BLOB data (result = %d)\n"
+msgstr ""
+
+#: pg_backup_archiver.c:1199
 #, c-format
 msgid "could not write to large object (result: %d, expected: %d)\n"
 msgstr ""
 
-#: pg_backup_archiver.c:1207
+#: pg_backup_archiver.c:1208
 msgid "could not write to compressed archive\n"
 msgstr "konnte nicht in komprimiertes Archiv schreiben\n"
 
-#: pg_backup_archiver.c:1215
+#: pg_backup_archiver.c:1216
 msgid "could not write to custom output routine\n"
 msgstr ""
 
-#: pg_backup_archiver.c:1231
+#: pg_backup_archiver.c:1232
 #, c-format
 msgid "could not write to output file (%d != %d)\n"
 msgstr "konnte nicht in Ausgabedatei schreiben (%d != %d)\n"
 
-#: pg_backup_archiver.c:1454
+#: pg_backup_archiver.c:1457
 msgid "attempting to ascertain archive format\n"
 msgstr ""
 
-#: pg_backup_archiver.c:1474 pg_backup_files.c:150
+#: pg_backup_archiver.c:1477 pg_backup_files.c:150
 #, c-format
 msgid "could not open input file: %s\n"
 msgstr "konnte Eingabedatei nicht öffnen: %s\n"
 
-#: pg_backup_archiver.c:1481
+#: pg_backup_archiver.c:1484
 #, c-format
 msgid "could not read input file: %s\n"
 msgstr "konnte nicht aus Eingabedatei lesen: %s\n"
 
-#: pg_backup_archiver.c:1483
+#: pg_backup_archiver.c:1486
 #, c-format
 msgid "input file is too short (read %d, expected 5)\n"
 msgstr "Eingabedatei ist zu kurz (gelesen: %d, erwartet: 5)\n"
 
-#: pg_backup_archiver.c:1528
+#: pg_backup_archiver.c:1531
 msgid "input file does not appear to be a valid archive (too short?)\n"
 msgstr "Eingabedatei scheint kein gültiges Archiv zu sein (zu kurz?)\n"
 
-#: pg_backup_archiver.c:1531
+#: pg_backup_archiver.c:1534
 msgid "input file does not appear to be a valid archive\n"
 msgstr "Eingabedatei scheint kein gültiges Archiv zu sein\n"
 
-#: pg_backup_archiver.c:1550
+#: pg_backup_archiver.c:1553
 #, c-format
 msgid "read %d bytes into lookahead buffer\n"
 msgstr ""
 
-#: pg_backup_archiver.c:1556
+#: pg_backup_archiver.c:1559
 #, c-format
 msgid "could not close the input file after reading header: %s\n"
 msgstr ""
 
-#: pg_backup_archiver.c:1573
+#: pg_backup_archiver.c:1576
 #, c-format
 msgid "allocating AH for %s, format %d\n"
 msgstr ""
 
-#: pg_backup_archiver.c:1623
+#: pg_backup_archiver.c:1626
 #, c-format
 msgid "archive format is %d\n"
 msgstr ""
 
-#: pg_backup_archiver.c:1651
+#: pg_backup_archiver.c:1654
 #, c-format
 msgid "unrecognized file format '%d'\n"
 msgstr ""
 
-#: pg_backup_archiver.c:1765
+#: pg_backup_archiver.c:1768
 msgid "failed sanity check (bad entry id) - perhaps a corrupt TOC\n"
 msgstr ""
 
-#: pg_backup_archiver.c:1797
+#: pg_backup_archiver.c:1800
 #, c-format
 msgid "read dependency for %s -> %s\n"
 msgstr ""
 
-#: pg_backup_archiver.c:1961
+#: pg_backup_archiver.c:1819
+#, c-format
+msgid "read TOC entry %d (id %d) for %s %s\n"
+msgstr ""
+
+#: pg_backup_archiver.c:1964
 msgid ""
 "WARNING: requested compression not available in this installation - archive "
 "will be uncompressed\n"
 msgstr ""
 
-#: pg_backup_archiver.c:1994
+#: pg_backup_archiver.c:1997
 msgid "did not find magic string in file header\n"
 msgstr ""
 
-#: pg_backup_archiver.c:2008
+#: pg_backup_archiver.c:2011
 #, c-format
 msgid "unsupported version (%d.%d) in file header\n"
 msgstr ""
 
-#: pg_backup_archiver.c:2013
+#: pg_backup_archiver.c:2016
 #, c-format
 msgid "sanity check on integer size (%d) failed\n"
 msgstr ""
 
-#: pg_backup_archiver.c:2016
+#: pg_backup_archiver.c:2019
 msgid ""
 "WARNING: archive was made on a machine with larger integers, some operations "
 "may fail\n"
 msgstr ""
 
-#: pg_backup_archiver.c:2021
+#: pg_backup_archiver.c:2024
 #, c-format
 msgid "expected format (%d) differs from format found in file (%d)\n"
 msgstr ""
+"erwartetes Format (%d) ist nicht das gleiche wie das in der Datei gefundene "
+"(%d)\n"
 
-#: pg_backup_archiver.c:2037
+#: pg_backup_archiver.c:2040
 msgid ""
 "WARNING: archive is compressed, but this installation does not support "
 "compression - no data will be available\n"
 msgstr ""
 
-#: pg_backup_archiver.c:2055
-msgid "WARNING: bad creation date in header\n"
-msgstr ""
+#: pg_backup_archiver.c:2058
+msgid "WARNING: invalid creation date in header\n"
+msgstr "WARNUNG: ungültiges Erstellungsdatum im Kopf\n"
 
-#: pg_backup_custom.c:183
-#, c-format
-msgid "could not open archive file %s: %s\n"
+#: pg_backup_custom.c:105
+msgid "custom archiver"
 msgstr ""
 
-#: pg_backup_custom.c:196
+#: pg_backup_custom.c:183 pg_backup_custom.c:196
 #, c-format
-msgid "could not open archive file %s: %s"
-msgstr ""
+msgid "could not open archive file %s: %s\n"
+msgstr "konnte Archivdatei %s nicht öffnen: %s\n"
 
 #: pg_backup_custom.c:389
 msgid "invalid OID for BLOB\n"
@@ -917,7 +1217,7 @@ msgstr ""
 #: pg_backup_custom.c:550 pg_backup_custom.c:907
 #, c-format
 msgid "could not initialize compression library: %s\n"
-msgstr ""
+msgstr "konnte Komprimierungsbibliothek nicht initialisieren: %s\n"
 
 #: pg_backup_custom.c:572 pg_backup_custom.c:696
 #, c-format
@@ -932,7 +1232,7 @@ msgstr ""
 #: pg_backup_custom.c:724
 #, c-format
 msgid "could not write byte: %s\n"
-msgstr ""
+msgstr "konnte Byte nicht schreiben: %s\n"
 
 #: pg_backup_custom.c:767 pg_backup_files.c:418
 #, c-format
@@ -942,7 +1242,7 @@ msgstr ""
 #: pg_backup_custom.c:837
 #, c-format
 msgid "could not close archive file: %s\n"
-msgstr ""
+msgstr "konnte Archivdatei nicht schließen: %s\n"
 
 #: pg_backup_custom.c:860
 msgid "WARNING: ftell mismatch with filePos - filePos used\n"
@@ -966,142 +1266,181 @@ msgstr ""
 msgid "could not close compression stream: %s\n"
 msgstr ""
 
-#: pg_backup_db.c:131
+#: pg_backup_db.c:40
+msgid "archiver (db)"
+msgstr "Archivierer (DB)"
+
+#: pg_backup_db.c:130
 #, c-format
 msgid "unable to parse version string \"%s\"\n"
 msgstr ""
 
-#: pg_backup_db.c:156
+#: pg_backup_db.c:155
 #, c-format
 msgid "could not get version from server: %s"
 msgstr "konnte Version des Servers nicht ermitteln: %s"
 
-#: pg_backup_db.c:168
+#: pg_backup_db.c:167
 #, c-format
 msgid "server version: %s, %s version: %s\n"
-msgstr ""
+msgstr "Version des Servers: %s, Version vom %s: %s\n"
 
-#: pg_backup_db.c:171
+# XXX  bessere Übersetzung von mismatch?
+#: pg_backup_db.c:170
 msgid "proceeding despite version mismatch\n"
-msgstr ""
+msgstr "Fortsetzung trotz unterschiedlicher Versionen\n"
 
-#: pg_backup_db.c:173
+#: pg_backup_db.c:172
 msgid ""
 "aborting because of version mismatch  (Use the -i option to proceed "
 "anyway.)\n"
 msgstr ""
+"Abbruch wegen unterschiedlicher Versionen  (Verwenden Sie die Option -i um "
+"trotzdem fortzusetzen.)\n"
 
-#: pg_backup_db.c:194
+#: pg_backup_db.c:193
 #, c-format
 msgid "null result checking superuser status of %s\n"
 msgstr ""
 
-#: pg_backup_db.c:197
+#: pg_backup_db.c:196
 #, c-format
 msgid "could not check superuser status of %s: %s"
 msgstr ""
 
-#: pg_backup_db.c:282 pg_backup_db.c:315 pg_backup_db.c:374 pg_backup_db.c:403
+#: pg_backup_db.c:277
+#, c-format
+msgid "connecting to database %s as user %s\n"
+msgstr "verbinde mit Datenbank %s als Benutzer %s\n"
+
+#: pg_backup_db.c:281 pg_backup_db.c:314 pg_backup_db.c:373 pg_backup_db.c:402
 msgid "Password: "
 msgstr "Paßwort: "
 
-#: pg_backup_db.c:294
+#: pg_backup_db.c:293
 msgid "failed to reconnect to database\n"
 msgstr ""
 
-#: pg_backup_db.c:318
+#: pg_backup_db.c:317
 #, c-format
 msgid "could not reconnect to database: %s"
 msgstr ""
 
-#: pg_backup_db.c:350
-msgid "already connected to database\n"
-msgstr ""
+#: pg_backup_db.c:349
+msgid "already connected to database\n"
+msgstr "bereits mit einer Datenbank verbunden\n"
 
-#: pg_backup_db.c:393
+#: pg_backup_db.c:392
 msgid "failed to connect to database\n"
-msgstr ""
+msgstr "Verbinden zur Datenbank schlug fehl\n"
 
-#: pg_backup_db.c:412
+#: pg_backup_db.c:411
 #, c-format
 msgid "connection to database \"%s\" failed: %s"
 msgstr ""
 
-#: pg_backup_db.c:452
+#: pg_backup_db.c:451
 #, c-format
-msgid "%s: no result from backend\n"
-msgstr ""
+msgid "%s: no result from server\n"
+msgstr "%s: kein Ergebnis vom Server\n"
 
-#: pg_backup_db.c:459
+#: pg_backup_db.c:458
 msgid "COPY command executed in non-primary connection\n"
 msgstr ""
 
-#: pg_backup_db.c:464
+#: pg_backup_db.c:463
 #, c-format
 msgid "%s: %s"
 msgstr "%s: %s"
 
-#: pg_backup_db.c:547
+#: pg_backup_db.c:546
 msgid "error returned by PQputline\n"
-msgstr ""
+msgstr "Fehler in PQputline\n"
 
-#: pg_backup_db.c:559
+#: pg_backup_db.c:558
 msgid "error returned by PQendcopy\n"
-msgstr ""
+msgstr "Fehler in PQendcopy\n"
 
-#: pg_backup_db.c:608
+#: pg_backup_db.c:607
 msgid "could not execute query"
 msgstr "konnte Abfrage nicht ausführen"
 
-#: pg_backup_db.c:698
+#: pg_backup_db.c:697
 #, c-format
 msgid "could not find oid columns of table \"%s\": %s"
+msgstr "konnte die OID-Spalten der Tabelle »%s« nicht finden: %s"
+
+#: pg_backup_db.c:703
+#, c-format
+msgid "no OID type columns in table %s\n"
+msgstr "keine Spalten vom Typ OID in Tabelle %s\n"
+
+#: pg_backup_db.c:712
+#, c-format
+msgid "fixing BLOB cross-references for %s.%s\n"
 msgstr ""
 
-#: pg_backup_db.c:733
+#: pg_backup_db.c:727
+#, c-format
+msgid "SQL: %s\n"
+msgstr "SQL: %s\n"
+
+#: pg_backup_db.c:732
 #, c-format
 msgid "could not update column \"%s\" of table \"%s\": %s"
 msgstr ""
 
-#: pg_backup_db.c:738
+#: pg_backup_db.c:737
 #, c-format
 msgid "error while updating column \"%s\" of table \"%s\": %s"
 msgstr ""
 
-#: pg_backup_db.c:764
+#: pg_backup_db.c:759
+msgid "creating table for BLOB cross-references\n"
+msgstr ""
+
+#: pg_backup_db.c:763
 msgid "could not create BLOB cross reference table"
 msgstr ""
 
-#: pg_backup_db.c:769
+#: pg_backup_db.c:768
 msgid "could not create index on BLOB cross reference table"
 msgstr ""
 
-#: pg_backup_db.c:779
+#: pg_backup_db.c:778
 msgid "could not create BLOB cross reference entry"
 msgstr ""
 
-#: pg_backup_db.c:789
+#: pg_backup_db.c:788
 msgid "could not start database transaction"
-msgstr ""
+msgstr "konnte Datenbanktransaktion nicht starten"
 
-#: pg_backup_db.c:801
+#: pg_backup_db.c:800
 msgid "could not start transaction for BLOB cross references"
 msgstr ""
 
-#: pg_backup_db.c:812
+#: pg_backup_db.c:811
 msgid "could not commit database transaction"
-msgstr ""
+msgstr "konnte Datenbanktransaktion nicht beenden"
 
-#: pg_backup_db.c:823
+#: pg_backup_db.c:822
 msgid "could not commit transaction for BLOB cross references"
 msgstr ""
 
+#: pg_backup_files.c:77
+msgid "file archiver"
+msgstr "Datei-Archivierer"
+
 #: pg_backup_files.c:122
 msgid ""
 "WARNING:\n"
-"  This format is for demonstration purposes, it is not intended for\n"
+"  This format is for demonstration purposes; it is not intended for\n"
 "  normal use. Files will be written in the current working directory.\n"
 msgstr ""
+"WARNUNG:\n"
+"  Dieses Format ist für Demonstrationszwecke; es ist nicht für den\n"
+"  normalen Gebrauch.  Dateien werden in das aktuelle Verzeichnis\n"
+"  geschrieben.\n"
 
 #: pg_backup_files.c:248
 msgid "could not open data file for output\n"
@@ -1155,6 +1494,10 @@ msgstr ""
 msgid "this format cannot be read\n"
 msgstr "dieses Format kann nicht gelesen werden\n"
 
+#: pg_backup_tar.c:104
+msgid "tar archiver"
+msgstr "Tar-Archivierer"
+
 #: pg_backup_tar.c:176
 #, c-format
 msgid "could not open TOC file for output: %s\n"
@@ -1217,6 +1560,11 @@ msgid ""
 "at position %d\n"
 msgstr ""
 
+#: pg_backup_tar.c:718
+#, c-format
+msgid "restoring BLOB oid %u\n"
+msgstr ""
+
 #: pg_backup_tar.c:857
 msgid "could not write null block at end of tar archive\n"
 msgstr ""
@@ -1240,11 +1588,26 @@ msgstr ""
 msgid "could not output padding at end of tar member\n"
 msgstr ""
 
+#: pg_backup_tar.c:1091
+#, c-format
+msgid "moving from position %d (%x) to next member at file position %d (%x)\n"
+msgstr ""
+
+#: pg_backup_tar.c:1099
+#, c-format
+msgid "now at file position %d (%x)\n"
+msgstr ""
+
 #: pg_backup_tar.c:1107 pg_backup_tar.c:1134
 #, c-format
 msgid "could not find header for file %s in tar archive\n"
 msgstr ""
 
+#: pg_backup_tar.c:1118
+#, c-format
+msgid "skipping tar member %s\n"
+msgstr ""
+
 #: pg_backup_tar.c:1122
 #, c-format
 msgid ""
@@ -1262,6 +1625,11 @@ msgstr ""
 msgid "incomplete tar header found (%d bytes)\n"
 msgstr ""
 
+#: pg_backup_tar.c:1205
+#, c-format
+msgid "TOC Entry %s at %d (length %d, checksum %d)\n"
+msgstr ""
+
 #: pg_backup_tar.c:1209
 #, c-format
 msgid ""
@@ -1352,7 +1720,8 @@ msgstr ""
 
 #: pg_restore.c:418
 msgid "If no input file name is supplied, then standard input is used.\n"
-msgstr "Wenn keine Eingabedatei angegeben ist, wird die Standardeingabe verwendet.\n"
+msgstr ""
+"Wenn keine Eingabedatei angegeben ist, wird die Standardeingabe verwendet.\n"
 
 #: pg_restore.c:419
 msgid "Report bugs to <pgsql-bugs@postgresql.org>."
index d815509..581e3d9 100644 (file)
@@ -1,8 +1,8 @@
-# $Header: /cvsroot/pgsql/src/bin/pg_dump/nls.mk,v 1.1 2001/06/27 21:21:37 petere Exp $
+# $Header: /cvsroot/pgsql/src/bin/pg_dump/nls.mk,v 1.2 2001/07/03 20:21:48 petere Exp $
 CATALOG_NAME   := pg_dump
 AVAIL_LANGUAGES        := de
 GETTEXT_FILES  := pg_dump.c common.c pg_backup_archiver.c pg_backup_custom.c \
                    pg_backup_db.c pg_backup_files.c pg_backup_null.c \
                    pg_backup_tar.c pg_restore.c
 GETTEXT_TRIGGERS:= write_msg:2 die_horribly:3 exit_horribly:3 simple_prompt \
-                   ExecuteSqlCommand:3
+                   ExecuteSqlCommand:3 ahlog:3
index ed7a484..eea98ca 100644 (file)
@@ -15,7 +15,7 @@
  *
  *
  * IDENTIFICATION
- *             $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.28 2001/06/27 21:21:37 petere Exp $
+ *             $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.29 2001/07/03 20:21:48 petere Exp $
  *
  * Modifications - 28-Jun-2000 - pjw@rhyme.com.au
  *
@@ -91,7 +91,7 @@ static void _fixupOidInfo(TocEntry *te);
 static Oid _findMaxOID(const char *((*deps)[]));
 
 const char *progname;
-static char *modulename = "archiver";
+static char *modulename = gettext_noop("archiver");
 
 static void _write_msg(const char *modulename, const char *fmt, va_list ap);
 static void _die_horribly(ArchiveHandle *AH, const char *modulename, const char *fmt, va_list ap);
@@ -170,7 +170,7 @@ RestoreArchive(Archive *AHX, RestoreOptions *ropt)
         */
        if (ropt->useDB)
        {
-               ahlog(AH, 1, "Connecting to database for restore\n");
+               ahlog(AH, 1, "connecting to database for restore\n");
                if (AH->version < K_VERS_1_3)
                        die_horribly(AH, modulename, "direct database connections are not supported in pre-1.3 archives\n");
 
@@ -219,7 +219,7 @@ RestoreArchive(Archive *AHX, RestoreOptions *ropt)
                if (impliedDataOnly)
                {
                        ropt->dataOnly = impliedDataOnly;
-                       ahlog(AH, 1, "Implied data-only restore\n");
+                       ahlog(AH, 1, "implied data-only restore\n");
                }
        }
 
@@ -247,8 +247,9 @@ RestoreArchive(Archive *AHX, RestoreOptions *ropt)
                {
                        reqs = _tocEntryRequired(te, ropt);
                        if (((reqs & 1) != 0) && te->dropStmt)
-                       {                                       /* We want the schema */
-                               ahlog(AH, 1, "Dropping %s %s\n", te->desc, te->name);
+                       {
+                               /* We want the schema */
+                               ahlog(AH, 1, "dropping %s %s\n", te->desc, te->name);
                                /* Reconnect if necessary */
                                _reconnectAsOwner(AH, "-", te);
                                /* Drop it */
@@ -284,14 +285,14 @@ RestoreArchive(Archive *AHX, RestoreOptions *ropt)
                        /* Reconnect if necessary */
                        _reconnectAsOwner(AH, "-", te);
 
-                       ahlog(AH, 1, "Creating %s %s\n", te->desc, te->name);
+                       ahlog(AH, 1, "creating %s %s\n", te->desc, te->name);
                        _printTocEntry(AH, te, ropt, false);
                        defnDumped = true;
 
                        /* If we created a DB, connect to it... */
                        if (strcmp(te->desc, "DATABASE") == 0)
                        {
-                               ahlog(AH, 1, "Connecting to new DB '%s' as %s\n", te->name, te->owner);
+                               ahlog(AH, 1, "connecting to new database %s as user %s\n", te->name, te->owner);
                                _reconnectAsUser(AH, te->name, te->owner);
                        }
                }       
@@ -346,7 +347,7 @@ RestoreArchive(Archive *AHX, RestoreOptions *ropt)
                                                 */
                                                _reconnectAsOwner(AH, "-", te);
 
-                                               ahlog(AH, 1, "Restoring data for %s \n", te->name);
+                                               ahlog(AH, 1, "restoring data for table %s\n", te->name);
 
                                                /*
                                                 * If we have a copy statement, use it. As of V1.3, these
@@ -367,7 +368,7 @@ RestoreArchive(Archive *AHX, RestoreOptions *ropt)
                                }
                        } else if (!defnDumped) {
                                /* If we haven't already dumped the defn part, do so now */ 
-                               ahlog(AH, 1, "Executing %s %s\n", te->desc, te->name);
+                               ahlog(AH, 1, "executing %s %s\n", te->desc, te->name);
                                _printTocEntry(AH, te, ropt, false);
                        }
                }
@@ -391,18 +392,18 @@ RestoreArchive(Archive *AHX, RestoreOptions *ropt)
                        if (strcmp(te->desc, "TABLE DATA") == 0)
                        {
 
-                               ahlog(AH, 2, "Checking if we loaded %s\n", te->name);
+                               ahlog(AH, 2, "checking whether we loaded %s\n", te->name);
 
                                reqs = _tocEntryRequired(te, ropt);
 
                                if ((reqs & 2) != 0)    /* We loaded the data */
                                {
-                                       ahlog(AH, 1, "Fixing up BLOB ref for %s\n", te->name);
+                                       ahlog(AH, 1, "fixing up BLOB reference for %s\n", te->name);
                                        FixupBlobRefs(AH, te->name);
                                }
                        }
                        else
-                               ahlog(AH, 2, "Ignoring BLOB xrefs for %s %s\n", te->desc, te->name);
+                               ahlog(AH, 2, "ignoring BLOB cross-references for %s %s\n", te->desc, te->name);
 
                        te = te->next;
                }
@@ -489,7 +490,7 @@ _disableTriggersIfNecessary(ArchiveHandle *AH, TocEntry *te, RestoreOptions *rop
                }
        }
 
-       ahlog(AH, 1, "Disabling triggers\n");
+       ahlog(AH, 1, "disabling triggers\n");
 
        /*
         * Disable them. This is a hack. Needs to be done via an appropriate
@@ -549,7 +550,7 @@ _enableTriggersIfNecessary(ArchiveHandle *AH, TocEntry *te, RestoreOptions *ropt
                }
        }
 
-       ahlog(AH, 1, "Enabling triggers\n");
+       ahlog(AH, 1, "enabling triggers\n");
 
        /*
         * Enable them. This is a hack. Needs to be done via an appropriate
@@ -752,14 +753,14 @@ EndRestoreBlobs(ArchiveHandle *AH)
 {
        if (AH->txActive)
        {
-               ahlog(AH, 2, "Committing BLOB transactions\n");
+               ahlog(AH, 2, "committing BLOB transactions\n");
                CommitTransaction(AH);
        }
 
        if (AH->blobTxActive)
                CommitTransactionXref(AH);
 
-       ahlog(AH, 1, "Restored %d BLOBs\n", AH->blobCount);
+       ahlog(AH, 1, "restored %d BLOBs\n", AH->blobCount);
 }
 
 
@@ -769,7 +770,7 @@ EndRestoreBlobs(ArchiveHandle *AH)
 void
 StartRestoreBlob(ArchiveHandle *AH, Oid oid)
 {
-       int                     loOid;
+       Oid                     loOid;
 
        AH->blobCount++;
 
@@ -787,7 +788,7 @@ StartRestoreBlob(ArchiveHandle *AH, Oid oid)
         */
        if (!AH->txActive)
        {
-               ahlog(AH, 2, "Starting BLOB transactions\n");
+               ahlog(AH, 2, "starting BLOB transactions\n");
                StartTransaction(AH);
        }
        if (!AH->blobTxActive)
@@ -797,7 +798,7 @@ StartRestoreBlob(ArchiveHandle *AH, Oid oid)
        if (loOid == 0)
                die_horribly(AH, modulename, "could not create BLOB\n");
 
-       ahlog(AH, 2, "Restoring BLOB oid %d as %d\n", oid, loOid);
+       ahlog(AH, 2, "restoring BLOB oid %u as %u\n", oid, loOid);
 
        InsertBlobXref(AH, oid, loOid);
 
@@ -819,7 +820,7 @@ EndRestoreBlob(ArchiveHandle *AH, Oid oid)
         */
        if (((AH->blobCount / BLOB_BATCH_SIZE) * BLOB_BATCH_SIZE) == AH->blobCount)
        {
-               ahlog(AH, 2, "Committing BLOB transactions\n");
+               ahlog(AH, 2, "committing BLOB transactions\n");
                CommitTransaction(AH);
                CommitTransactionXref(AH);
        }
@@ -1166,7 +1167,7 @@ ahlog(ArchiveHandle *AH, int level, const char *fmt,...)
                return;
 
        va_start(ap, fmt);
-       vfprintf(stderr, fmt, ap);
+       _write_msg(NULL, fmt, ap);
        va_end(ap);
 }
 
@@ -1193,7 +1194,7 @@ ahwrite(const void *ptr, size_t size, size_t nmemb, ArchiveHandle *AH)
        if (AH->writingBlob)
        {
                res = lo_write(AH->connection, AH->loFd, (void *) ptr, size * nmemb);
-               ahlog(AH, 5, "Wrote %d bytes of BLOB data (result = %d)\n", size * nmemb, res);
+               ahlog(AH, 5, "wrote %d bytes of BLOB data (result = %d)\n", size * nmemb, res);
                if (res < size * nmemb)
                        die_horribly(AH, modulename, "could not write to large object (result: %d, expected: %d)\n",
                                                 res, size * nmemb);
@@ -1239,7 +1240,7 @@ static void
 _write_msg(const char *modulename, const char *fmt, va_list ap)
 {
        if (modulename)
-               fprintf(stderr, "%s[%s]: ", progname, gettext(modulename));
+               fprintf(stderr, "%s: [%s] ", progname, gettext(modulename));
        else
                fprintf(stderr, "%s: ", progname);
        vfprintf(stderr, gettext(fmt), ap);
@@ -1260,6 +1261,8 @@ static void
 _die_horribly(ArchiveHandle *AH, const char *modulename, const char *fmt, va_list ap)
 {
        _write_msg(modulename, fmt, ap);
+       if (AH->public.verbose)
+               write_msg(NULL, "*** aborted because of error\n");
 
        if (AH)
                if (AH->connection)
@@ -1813,7 +1816,7 @@ ReadToc(ArchiveHandle *AH)
                if (AH->ReadExtraTocPtr)
                        (*AH->ReadExtraTocPtr) (AH, te);
 
-               ahlog(AH, 3, "Read TOC entry %d (id %d) for %s %s\n", i, te->id, te->desc, te->name);
+               ahlog(AH, 3, "read TOC entry %d (id %d) for %s %s\n", i, te->id, te->desc, te->name);
 
                te->prev = AH->toc->prev;
                AH->toc->prev->next = te;
@@ -2052,7 +2055,7 @@ ReadHead(ArchiveHandle *AH)
                AH->createDate = mktime(&crtm);
 
                if (AH->createDate == (time_t) -1)
-                       write_msg(modulename, "WARNING: bad creation date in header\n");
+                       write_msg(modulename, "WARNING: invalid creation date in header\n");
        }
 
 }
index 0d5dcda..16a1c06 100644 (file)
@@ -17,7 +17,7 @@
  *
  *
  * IDENTIFICATION
- *             $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_archiver.h,v 1.35 2001/06/27 21:21:37 petere Exp $
+ *             $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_archiver.h,v 1.36 2001/07/03 20:21:48 petere Exp $
  *
  * Modifications - 28-Jun-2000 - pjw@rhyme.com.au
  *     -       Initial version.
@@ -316,8 +316,8 @@ extern char *ConnectedUser(ArchiveHandle *AH);
 extern int     ConnectedUserIsSuperuser(ArchiveHandle *AH);
 
 int                    ahwrite(const void *ptr, size_t size, size_t nmemb, ArchiveHandle *AH);
-int                    ahprintf(ArchiveHandle *AH, const char *fmt,...);
+int                    ahprintf(ArchiveHandle *AH, const char *fmt,...) __attribute__((format(printf,2,3)));
 
-void           ahlog(ArchiveHandle *AH, int level, const char *fmt,...);
+void           ahlog(ArchiveHandle *AH, int level, const char *fmt,...) __attribute__((format(printf,3,4)));
 
 #endif
index 00120d3..9de3e1b 100644 (file)
@@ -19,7 +19,7 @@
  *
  *
  * IDENTIFICATION
- *             $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_custom.c,v 1.12 2001/06/27 21:21:37 petere Exp $
+ *             $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_custom.c,v 1.13 2001/07/03 20:21:48 petere Exp $
  *
  * Modifications - 28-Jun-2000 - pjw@rhyme.com.au
  *
@@ -102,7 +102,7 @@ static void _EndDataCompressor(ArchiveHandle *AH, TocEntry *te);
 static int     _getFilePos(ArchiveHandle *AH, lclContext *ctx);
 static int     _DoDeflate(ArchiveHandle *AH, lclContext *ctx, int flush);
 
-static char *modulename = "custom archiver";
+static char *modulename = gettext_noop("custom archiver");
 
 
 
@@ -193,7 +193,7 @@ InitArchiveFmt_Custom(ArchiveHandle *AH)
                else
                        AH->FH = stdin;
                if (!AH->FH)
-                       die_horribly(AH, modulename, "could not open archive file %s: %s", AH->fSpec, strerror(errno));
+                       die_horribly(AH, modulename, "could not open archive file %s: %s\n", AH->fSpec, strerror(errno));
 
                ctx->hasSeek = (fseek(AH->FH, 0, SEEK_CUR) == 0);
 
index d3962b6..51a0564 100644 (file)
@@ -5,7 +5,7 @@
  *     Implements the basic DB functions used by the archiver.
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_db.c,v 1.20 2001/06/27 21:21:37 petere Exp $
+ *       $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_db.c,v 1.21 2001/07/03 20:21:48 petere Exp $
  *
  * NOTES
  *
@@ -20,7 +20,6 @@
  *-------------------------------------------------------------------------
  */
 
-#include "pg_dump.h"
 #include "pg_backup.h"
 #include "pg_backup_archiver.h"
 #include "pg_backup_db.h"
@@ -38,7 +37,7 @@
 #include "strdup.h"
 #endif
 
-static const char *modulename = "archiver (db)";
+static const char *modulename = gettext_noop("archiver (db)");
 
 static void _check_database_version(ArchiveHandle *AH, bool ignoreVersion);
 static PGconn *_connectDB(ArchiveHandle *AH, const char *newdbname, char *newUser);
@@ -275,7 +274,7 @@ _connectDB(ArchiveHandle *AH, const char *reqdb, char *requser)
        else
                newuser = (char *) requser;
 
-       ahlog(AH, 1, "Connecting to %s as %s\n", newdb, newuser);
+       ahlog(AH, 1, "connecting to database %s as user %s\n", newdb, newuser);
 
        if (AH->requirePassword)
        {
@@ -347,7 +346,7 @@ ConnectDatabase(Archive *AHX,
        bool            need_pass = false;
 
        if (AH->connection)
-               die_horribly(AH, modulename, "already connected to database\n");
+               die_horribly(AH, modulename, "already connected to database\n");
 
        if (!dbname && !(dbname = getenv("PGDATABASE")))
                die_horribly(AH, modulename, "no database name specified\n");
@@ -449,7 +448,7 @@ _executeSqlCommand(ArchiveHandle *AH, PGconn *conn, PQExpBuffer qry, char *desc)
        /* fprintf(stderr, "Executing: '%s'\n\n", qry->data); */
        res = PQexec(conn, qry->data);
        if (!res)
-               die_horribly(AH, modulename, "%s: no result from backend\n", desc);
+               die_horribly(AH, modulename, "%s: no result from server\n", desc);
 
        if (PQresultStatus(res) != PGRES_COMMAND_OK && PQresultStatus(res) != PGRES_TUPLES_OK)
        {
@@ -701,7 +700,7 @@ FixupBlobRefs(ArchiveHandle *AH, char *tablename)
        if ((n = PQntuples(res)) == 0)
        {
                /* We're done */
-               ahlog(AH, 1, "No OID attributes in table %s\n", tablename);
+               ahlog(AH, 1, "no OID type columns in table %s\n", tablename);
                PQclear(res);
                return;
        }
@@ -710,7 +709,7 @@ FixupBlobRefs(ArchiveHandle *AH, char *tablename)
        {
                attr = PQgetvalue(res, i, 0);
 
-               ahlog(AH, 1, " - %s.%s\n", tablename, attr);
+               ahlog(AH, 1, "fixing BLOB cross-references for %s.%s\n", tablename, attr);
 
                resetPQExpBuffer(tblQry);
 
@@ -725,7 +724,7 @@ FixupBlobRefs(ArchiveHandle *AH, char *tablename)
                                  "(select * from %s x where x.oldOid = \"%s\".\"%s\");",
                                                  BLOB_XREF_TABLE, tablename, attr);
 
-               ahlog(AH, 10, " - sql:\n%s\n", tblQry->data);
+               ahlog(AH, 10, "SQL: %s\n", tblQry->data);
 
                uRes = PQexec(AH->blobConnection, tblQry->data);
                if (!uRes)
@@ -757,7 +756,7 @@ CreateBlobXrefTable(ArchiveHandle *AH)
        if (!AH->blobConnection)
                AH->blobConnection = _connectDB(AH, NULL, NULL);
 
-       ahlog(AH, 1, "Creating table for BLOBS xrefs\n");
+       ahlog(AH, 1, "creating table for BLOB cross-references\n");
 
        appendPQExpBuffer(qry, "Create Temporary Table %s(oldOid oid, newOid oid);", BLOB_XREF_TABLE);
 
index 2bbf68c..47a224f 100644 (file)
@@ -20,7 +20,7 @@
  *
  *
  * IDENTIFICATION
- *             $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_files.c,v 1.11 2001/06/27 21:21:37 petere Exp $
+ *             $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_files.c,v 1.12 2001/07/03 20:21:48 petere Exp $
  *
  * Modifications - 28-Jun-2000 - pjw@rhyme.com.au
  *
@@ -74,7 +74,7 @@ typedef struct
        char       *filename;
 } lclTocEntry;
 
-static char *modulename = "file archiver";
+static char *modulename = gettext_noop("file archiver");
 static void _LoadBlobs(ArchiveHandle *AH, RestoreOptions *ropt);
 static void _getBlobTocEntry(ArchiveHandle *AH, int *oid, char *fname);
 
@@ -120,7 +120,7 @@ InitArchiveFmt_Files(ArchiveHandle *AH)
        {
 
                write_msg(modulename, "WARNING:\n"
-                                 "  This format is for demonstration purposes, it is not intended for\n"
+                                 "  This format is for demonstration purposes; it is not intended for\n"
                                  "  normal use. Files will be written in the current working directory.\n");
 
                if (AH->fSpec && strcmp(AH->fSpec, "") != 0)
index 97001c2..f75dca1 100644 (file)
@@ -16,7 +16,7 @@
  *
  *
  * IDENTIFICATION
- *             $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_tar.c,v 1.16 2001/06/27 21:21:37 petere Exp $
+ *             $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_tar.c,v 1.17 2001/07/03 20:21:48 petere Exp $
  *
  * Modifications - 28-Jun-2000 - pjw@rhyme.com.au
  *
@@ -101,7 +101,7 @@ typedef struct
        char       *filename;
 } lclTocEntry;
 
-static char *modulename = "tar archiver";
+static char *modulename = gettext_noop("tar archiver");
 
 static void _LoadBlobs(ArchiveHandle *AH, RestoreOptions *ropt);
 
@@ -698,7 +698,7 @@ _PrintTocData(ArchiveHandle *AH, TocEntry *te, RestoreOptions *ropt)
 static void
 _LoadBlobs(ArchiveHandle *AH, RestoreOptions *ropt)
 {
-       int                     oid;
+       Oid                     oid;
        lclContext *ctx = (lclContext *) AH->formatData;
        TAR_MEMBER *th;
        int                     cnt;
@@ -711,11 +711,11 @@ _LoadBlobs(ArchiveHandle *AH, RestoreOptions *ropt)
        {
                ctx->FH = th;
 
-               oid = atoi(&th->targetFile[5]);
+               oid = (Oid)strtoul(&th->targetFile[5], NULL, 10);
 
                if (strncmp(th->targetFile, "blob_", 5) == 0 && oid != 0)
                {
-                       ahlog(AH, 1, " - Restoring BLOB oid %d\n", oid);
+                       ahlog(AH, 1, "restoring BLOB oid %u\n", oid);
 
                        StartRestoreBlob(AH, oid);
 
@@ -1088,7 +1088,7 @@ _tarPositionTo(ArchiveHandle *AH, const char *filename)
        /* Go to end of current file, if any */
        if (ctx->tarFHpos != 0)
        {
-               ahlog(AH, 4, "Moving from %d (%x) to next member at file position %d (%x)\n",
+               ahlog(AH, 4, "moving from position %d (%x) to next member at file position %d (%x)\n",
                          ctx->tarFHpos, ctx->tarFHpos,
                          ctx->tarNextMember, ctx->tarNextMember);
 
@@ -1096,7 +1096,7 @@ _tarPositionTo(ArchiveHandle *AH, const char *filename)
                        _tarReadRaw(AH, &c, 1, NULL, ctx->tarFH);
        }
 
-       ahlog(AH, 4, "Now at file position %d (%x)\n", ctx->tarFHpos, ctx->tarFHpos);
+       ahlog(AH, 4, "now at file position %d (%x)\n", ctx->tarFHpos, ctx->tarFHpos);
 
        /* We are at the start of the file. or at the next member */
 
@@ -1115,7 +1115,7 @@ _tarPositionTo(ArchiveHandle *AH, const char *filename)
 
        while (filename != NULL && strcmp(th->targetFile, filename) != 0)
        {
-               ahlog(AH, 4, "Skipping member %s\n", th->targetFile);
+               ahlog(AH, 4, "skipping tar member %s\n", th->targetFile);
 
                id = atoi(th->targetFile);
                if ((TocIDRequired(AH, id, AH->ropt) & 2) != 0)
@@ -1202,7 +1202,7 @@ _tarGetHeader(ArchiveHandle *AH, TAR_MEMBER *th)
        sscanf(&h[124], "%12o", &len);
        sscanf(&h[148], "%8o", &sum);
 
-       ahlog(AH, 3, "TOC Entry %s at %d (len=%d, chk=%d)\n", &name[0], hPos, len, sum);
+       ahlog(AH, 3, "TOC Entry %s at %d (length %d, checksum %d)\n", &name[0], hPos, len, sum);
 
        if (chk != sum)
                die_horribly(AH, modulename,
index 6d5d754..a73bb7b 100644 (file)
@@ -22,7 +22,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.212 2001/06/27 21:21:37 petere Exp $
+ *       $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.213 2001/07/03 20:21:49 petere Exp $
  *
  * Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
  *
@@ -314,10 +314,12 @@ help(const char *progname)
 }
 
 
-static void
-exit_nicely(PGconn *conn)
+void
+exit_nicely(void)
 {
-       PQfinish(conn);
+       PQfinish(g_conn);
+       if (g_verbose)
+               write_msg(NULL, "*** aborted because of error\n");
        exit(1);
 }
 
@@ -344,7 +346,7 @@ dumpClasses_nodumpData(Archive *fout, char *oid, void *dctxv)
        char            copybuf[COPYBUFSIZ];
 
        if (g_verbose)
-               fprintf(stderr, "%s dumping out the contents of table %s\n", g_comment_start, classname);
+               write_msg(NULL, "dumping out the contents of table %s\n", classname);
 
        if (oids == true)
        {
@@ -381,7 +383,7 @@ dumpClasses_nodumpData(Archive *fout, char *oid, void *dctxv)
                                  classname);
                write_msg(NULL, "Error message from server: %s", PQerrorMessage(g_conn));
                write_msg(NULL, "The command was: %s\n", query);
-               exit_nicely(g_conn);
+               exit_nicely();
        }
        else
        {
@@ -392,7 +394,7 @@ dumpClasses_nodumpData(Archive *fout, char *oid, void *dctxv)
                        write_msg(NULL, "The server returned status %d when %d was expected.\n", 
                                          PQresultStatus(res), PGRES_COPY_OUT);
                        write_msg(NULL, "The command was: %s\n", query);
-                       exit_nicely(g_conn);
+                       exit_nicely();
                }
                else
                {
@@ -478,7 +480,7 @@ dumpClasses_nodumpData(Archive *fout, char *oid, void *dctxv)
                        write_msg(NULL, "Error message from server: %s", PQerrorMessage(g_conn));
                        write_msg(NULL, "The command was: %s\n", query);
                        PQclear(res);
-                       exit_nicely(g_conn);
+                       exit_nicely();
                }
        }
 
@@ -510,7 +512,7 @@ dumpClasses_dumpData(Archive *fout, char *oid, void *dctxv)
                write_msg(NULL, "dumpClasses(): SQL command failed\n");
                write_msg(NULL, "Error message from server: %s", PQerrorMessage(g_conn));
                write_msg(NULL, "The command was: %s\n", q->data);
-               exit_nicely(g_conn);
+               exit_nicely();
        }
        for (tuple = 0; tuple < PQntuples(res); tuple++)
        {
@@ -623,18 +625,12 @@ dumpClasses(const TableInfo *tblinfo, const int numTables, Archive *fout,
 {
 
        int                     i;
-       char       *all_only;
        DataDumperPtr dumpFn;
        DumpContext *dumpCtx;
        char       *oidsPart;
        char            copyBuf[512];
        char       *copyStmt;
 
-       if (onlytable == NULL || (strlen(onlytable) == 0))
-               all_only = "all";
-       else
-               all_only = "only";
-
        if (oids == true)
                oidsPart = "WITH OIDS ";
        else
@@ -642,12 +638,12 @@ dumpClasses(const TableInfo *tblinfo, const int numTables, Archive *fout,
 
 
        if (g_verbose)
-               fprintf(stderr, "%s preparing to dump out the contents of %s %d table%s/sequence%s %s\n",
-                               g_comment_start, all_only,
-                (onlytable == NULL || (strlen(onlytable) == 0)) ? numTables : 1,
-                         (onlytable == NULL || (strlen(onlytable) == 0)) ? "s" : "",
-                         (onlytable == NULL || (strlen(onlytable) == 0)) ? "s" : "",
-                               g_comment_end);
+       {
+               if (onlytable == NULL || (strlen(onlytable) == 0))
+                       write_msg(NULL, "preparing to dump the contents of all %d tables/sequences\n", numTables);
+               else
+                       write_msg(NULL, "preparing to dump the contents of only one table/sequence\n");
+       }
 
        for (i = 0; i < numTables; i++)
        {
@@ -663,10 +659,11 @@ dumpClasses(const TableInfo *tblinfo, const int numTables, Archive *fout,
                if (!onlytable || (strcmp(classname, onlytable) == 0) || (strlen(onlytable) == 0))
                {
                        if (g_verbose)
-                               fprintf(stderr, "%s preparing to dump out the contents of Table '%s' %s\n",
-                                               g_comment_start, classname, g_comment_end);
+                               write_msg(NULL, "preparing to dump the contents of table %s\n", classname);
 
-                       /* becomeUser(fout, tblinfo[i].usename); */
+#if 0
+                       becomeUser(fout, tblinfo[i].usename);
+#endif
 
                        dumpCtx = (DumpContext *) malloc(sizeof(DumpContext));
                        dumpCtx->tblinfo = (TableInfo *) tblinfo;
@@ -921,7 +918,7 @@ main(int argc, char **argv)
 
                        case 'u':
                                force_password = true;
-                               username = simple_prompt("Username: ", 100, true);
+                               username = simple_prompt("User name: ", 100, true);
                                break;
 
                        case 'U':
@@ -981,7 +978,7 @@ main(int argc, char **argv)
 
        if (dataOnly && schemaOnly)
        {
-               write_msg(NULL, "'Schema only' and 'data only' are incompatible options.\n");
+               write_msg(NULL, "The options \"schema only\" (-s) and \"data only\" (-a) cannot be used together.\n");
                exit(1);
        }
 
@@ -1086,8 +1083,7 @@ main(int argc, char **argv)
                setMaxOid(g_fout);
 
        if (g_verbose)
-               fprintf(stderr, "%s last builtin oid is %u %s\n",
-                               g_comment_start, g_last_builtin_oid, g_comment_end);
+               write_msg(NULL, "last built-in oid is %u\n", g_last_builtin_oid);
        tblinfo = dumpSchema(g_fout, &numTables, tablename, aclsSkip, oids, schemaOnly, dataOnly);
 
        if (!schemaOnly)
@@ -1163,7 +1159,7 @@ dumpDatabase(Archive *AH)
        int                     i_dba;
 
        if (g_verbose)
-               fprintf(stderr, "%s saving database definition\n", g_comment_start);
+               write_msg(NULL, "saving database definition\n");
 
        /* Get the dba */
        appendPQExpBuffer(dbQry, "select (select usename from pg_user where datdba = usesysid) as dba from pg_database"
@@ -1177,7 +1173,7 @@ dumpDatabase(Archive *AH)
                write_msg(NULL, "SQL command failed\n");
                write_msg(NULL, "Error message from server: %s", PQerrorMessage(g_conn));
                write_msg(NULL, "The command was: %s\n", dbQry->data);
-               exit_nicely(g_conn);
+               exit_nicely();
        }
 
        ntups = PQntuples(res);
@@ -1185,14 +1181,14 @@ dumpDatabase(Archive *AH)
        if (ntups <= 0)
        {
                write_msg(NULL, "missing pg_database entry for database \"%s\"\n", PQdb(g_conn));
-               exit_nicely(g_conn);
+               exit_nicely();
        }
 
        if (ntups != 1)
        {
                write_msg(NULL, "query returned more than one (%d) pg_database entry for database \"%s\"\n",
                                  ntups, PQdb(g_conn));
-               exit_nicely(g_conn);
+               exit_nicely();
        }
 
        appendPQExpBuffer(creaQry, "Create Database \"%s\";\n", PQdb(g_conn));
@@ -1232,7 +1228,7 @@ dumpBlobs(Archive *AH, char *junkOid, void *junkVal)
        int                     blobOid;
 
        if (g_verbose)
-               fprintf(stderr, "%s saving BLOBs\n", g_comment_start);
+               write_msg(NULL, "saving BLOBs\n");
 
        /* Cursor to get all BLOB tables */
        if (AH->remoteVersion >= 70100)
@@ -1246,7 +1242,7 @@ dumpBlobs(Archive *AH, char *junkOid, void *junkVal)
        if (!res || PQresultStatus(res) != PGRES_COMMAND_OK)
        {
                write_msg(NULL, "dumpBlobs(): cursor declaration failed: %s", PQerrorMessage(g_conn));
-               exit_nicely(g_conn);
+               exit_nicely();
        }
 
        /* Fetch for cursor */
@@ -1262,7 +1258,7 @@ dumpBlobs(Archive *AH, char *junkOid, void *junkVal)
                {
                        write_msg(NULL, "dumpBlobs(): fetch from cursor failed: %s",
                                          PQerrorMessage(g_conn));
-                       exit_nicely(g_conn);
+                       exit_nicely();
                }
 
                /* Process the tuples, if any */
@@ -1275,7 +1271,7 @@ dumpBlobs(Archive *AH, char *junkOid, void *junkVal)
                        {
                                write_msg(NULL, "dumpBlobs(): could not open large object: %s",
                                                  PQerrorMessage(g_conn));
-                               exit_nicely(g_conn);
+                               exit_nicely();
                        }
 
                        StartBlob(AH, blobOid);
@@ -1288,7 +1284,7 @@ dumpBlobs(Archive *AH, char *junkOid, void *junkVal)
                                {
                                        write_msg(NULL, "dumpBlobs(): error reading large object: %s",
                                                          PQerrorMessage(g_conn));
-                                       exit_nicely(g_conn);
+                                       exit_nicely();
                                }
 
                                WriteData(AH, buf, cnt);
@@ -1372,7 +1368,7 @@ getTypes(int *numTypes)
                PQresultStatus(res) != PGRES_TUPLES_OK)
        {
                write_msg(NULL, "query to obtain list of data types failed: %s", PQerrorMessage(g_conn));
-               exit_nicely(g_conn);
+               exit_nicely();
        }
 
        ntups = PQntuples(res);
@@ -1490,7 +1486,7 @@ getOperators(int *numOprs)
                PQresultStatus(res) != PGRES_TUPLES_OK)
        {
                write_msg(NULL, "query to obtain list of operators failed: %s", PQerrorMessage(g_conn));
-               exit_nicely(g_conn);
+               exit_nicely();
        }
 
        ntups = PQntuples(res);
@@ -1853,9 +1849,9 @@ getAggregates(int *numAggs)
        if (!res ||
                PQresultStatus(res) != PGRES_TUPLES_OK)
        {
-               write_msg(NULL, "query to obtain list of aggregate functions failed: %s\n",
+               write_msg(NULL, "query to obtain list of aggregate functions failed: %s",
                                  PQerrorMessage(g_conn));
-               exit_nicely(g_conn);
+               exit_nicely();
        }
 
        ntups = PQntuples(res);
@@ -1956,7 +1952,7 @@ getFuncs(int *numFuncs)
        {
                write_msg(NULL, "query to obtain list of functions failed: %s",
                                  PQerrorMessage(g_conn));
-               exit_nicely(g_conn);
+               exit_nicely();
        }
 
        ntups = PQntuples(res);
@@ -2004,7 +2000,7 @@ getFuncs(int *numFuncs)
                {
                        write_msg(NULL, "failed sanity check: function %s has more than %d (namely %d) arguments\n",
                                          finfo[i].proname, FUNC_MAX_ARGS, finfo[i].nargs);
-                       exit(1);
+                       exit_nicely();
                }
                parseNumericArray(PQgetvalue(res, i, i_proargtypes),
                                                  finfo[i].argtypes,
@@ -2099,7 +2095,7 @@ getTables(int *numTables, FuncInfo *finfo, int numFuncs)
        {
                write_msg(NULL, "query to obtain list of tables failed: %s",
                                  PQerrorMessage(g_conn));
-               exit_nicely(g_conn);
+               exit_nicely();
        }
 
        ntups = PQntuples(res);
@@ -2150,7 +2146,7 @@ getTables(int *numTables, FuncInfo *finfo, int numFuncs)
                        {
                                write_msg(NULL, "query to obtain definition of view \"%s\" failed: %s",
                                                  tblinfo[i].relname, PQerrorMessage(g_conn));
-                               exit_nicely(g_conn);
+                               exit_nicely();
                        }
 
                        if (PQntuples(res2) != 1)
@@ -2161,14 +2157,14 @@ getTables(int *numTables, FuncInfo *finfo, int numFuncs)
                                else
                                        write_msg(NULL, "query to obtain definition of view \"%s\" returned more than one definition\n",
                                                        tblinfo[i].relname);
-                               exit_nicely(g_conn);
+                               exit_nicely();
                        }
 
                        if (PQgetisnull(res2, 0, 1))
                        {
                                write_msg(NULL, "query to obtain definition of view \"%s\" returned NULL oid\n",
                                                  tblinfo[i].relname);
-                               exit_nicely(g_conn);
+                               exit_nicely();
                        }
 
                        tblinfo[i].viewdef = strdup(PQgetvalue(res2, 0, 0));
@@ -2178,7 +2174,7 @@ getTables(int *numTables, FuncInfo *finfo, int numFuncs)
                        {
                                write_msg(NULL, "definition of view \"%s\" appears to be empty (length zero)\n",
                                                  tblinfo[i].relname);
-                               exit_nicely(g_conn);
+                               exit_nicely();
                        }
                }
                else
@@ -2201,10 +2197,8 @@ getTables(int *numTables, FuncInfo *finfo, int numFuncs)
                        int                     i2;
 
                        if (g_verbose)
-                               fprintf(stderr, "%s finding CHECK constraints for relation: '%s' %s\n",
-                                               g_comment_start,
-                                               tblinfo[i].relname,
-                                               g_comment_end);
+                               write_msg(NULL, "finding CHECK constraints for table %s\n",
+                                                 tblinfo[i].relname);
 
                        resetPQExpBuffer(query);
                        appendPQExpBuffer(query, "SELECT rcname, rcsrc from pg_relcheck "
@@ -2225,7 +2219,7 @@ getTables(int *numTables, FuncInfo *finfo, int numFuncs)
                                PQresultStatus(res2) != PGRES_TUPLES_OK)
                        {
                                write_msg(NULL, "query to obtain check constraints failed: %s", PQerrorMessage(g_conn));
-                               exit_nicely(g_conn);
+                               exit_nicely();
                        }
                        ntups2 = PQntuples(res2);
                        if (ntups2 > tblinfo[i].ncheck)
@@ -2233,7 +2227,7 @@ getTables(int *numTables, FuncInfo *finfo, int numFuncs)
                                write_msg(NULL, "expected %d check constraints on table \"%s\" but found %d\n",
                                                  tblinfo[i].ncheck, tblinfo[i].relname, ntups2);
                                write_msg(NULL, "(The system catalogs might be corrupted.)\n");
-                               exit_nicely(g_conn);
+                               exit_nicely();
                        }
 
                        /* Set ncheck to the number of *non-inherited* CHECK constraints */
@@ -2275,14 +2269,14 @@ getTables(int *numTables, FuncInfo *finfo, int numFuncs)
                        {
                                write_msg(NULL, "query to obtain primary key of table \"%s\" failed: %s",
                                                  tblinfo[i].relname, PQerrorMessage(g_conn));
-                               exit_nicely(g_conn);
+                               exit_nicely();
                        }
 
                        if (PQntuples(res2) > 1)
                        {
                                write_msg(NULL, "query to obtain primary key of table \"%s\" produced more than one result\n",
                                                tblinfo[i].relname);
-                               exit_nicely(g_conn);
+                               exit_nicely();
                        }
 
                        if (PQntuples(res2) == 1)
@@ -2332,7 +2326,7 @@ getTables(int *numTables, FuncInfo *finfo, int numFuncs)
                        {
                                write_msg(NULL, "query to obtain name of primary key of table \"%s\" failed: %s",
                                                  tblinfo[i].relname, PQerrorMessage(g_conn));
-                               exit_nicely(g_conn);
+                               exit_nicely();
                        }
 
                        n = PQntuples(res2);
@@ -2340,7 +2334,7 @@ getTables(int *numTables, FuncInfo *finfo, int numFuncs)
                        {
                                write_msg(NULL, "query to obtain name of primary key of table \"%s\" did not return exactly one result\n",
                                                  tblinfo[i].relname);
-                               exit_nicely(g_conn);
+                               exit_nicely();
                        }
 
                        /* Sanity check on LOJ */
@@ -2348,7 +2342,7 @@ getTables(int *numTables, FuncInfo *finfo, int numFuncs)
                        {
                                write_msg(NULL, "name of primary key of table \"%s\" returned NULL value\n",
                                                  tblinfo[i].relname);
-                               exit_nicely(g_conn);
+                               exit_nicely();
                        }
 
                        tblinfo[i].primary_key_name =
@@ -2356,7 +2350,7 @@ getTables(int *numTables, FuncInfo *finfo, int numFuncs)
                        if (tblinfo[i].primary_key_name == NULL)
                        {
                                write_msg(NULL, "out of memory\n");
-                               exit(1);
+                               exit_nicely();
                        }
                }
                else
@@ -2382,10 +2376,7 @@ getTables(int *numTables, FuncInfo *finfo, int numFuncs)
                        int                     i2;
 
                        if (g_verbose)
-                               fprintf(stderr, "%s finding Triggers for relation: '%s' %s\n",
-                                               g_comment_start,
-                                               tblinfo[i].relname,
-                                               g_comment_end);
+                               write_msg(NULL, "finding triggers for table %s\n", tblinfo[i].relname);
 
                        resetPQExpBuffer(query);
                        appendPQExpBuffer(query,
@@ -2402,14 +2393,14 @@ getTables(int *numTables, FuncInfo *finfo, int numFuncs)
                                PQresultStatus(res2) != PGRES_TUPLES_OK)
                        {
                                write_msg(NULL, "query to obtain list of triggers failed: %s", PQerrorMessage(g_conn));
-                               exit_nicely(g_conn);
+                               exit_nicely();
                        }
                        ntups2 = PQntuples(res2);
                        if (ntups2 != tblinfo[i].ntrig)
                        {
                                write_msg(NULL, "expected %d triggers on table \"%s\" but found %d\n",
                                                  tblinfo[i].ntrig, tblinfo[i].relname, ntups2);
-                               exit_nicely(g_conn);
+                               exit_nicely();
                        }
                        i_tgname = PQfnumber(res2, "tgname");
                        i_tgfoid = PQfnumber(res2, "tgfoid");
@@ -2489,7 +2480,7 @@ getTables(int *numTables, FuncInfo *finfo, int numFuncs)
                                        {
                                                write_msg(NULL, "query to obtain procedure name for trigger \"%s\" failed: %s",
                                                                  tgname, PQerrorMessage(g_conn));
-                                               exit_nicely(g_conn);
+                                               exit_nicely();
                                        }
 
                                        /* Sanity: Check we got only one tuple */
@@ -2498,7 +2489,7 @@ getTables(int *numTables, FuncInfo *finfo, int numFuncs)
                                        {
                                                write_msg(NULL, "query to obtain procedure name for trigger \"%s\" did not return exactly one result\n",
                                                                  tgname);
-                                               exit_nicely(g_conn);
+                                               exit_nicely();
                                        }
 
                                        tgfunc = strdup(PQgetvalue(r, 0, PQfnumber(r, "proname")));
@@ -2561,7 +2552,7 @@ getTables(int *numTables, FuncInfo *finfo, int numFuncs)
                                                {
                                                        write_msg(NULL, "query produced NULL referenced table name for trigger \"%s\" on table \"%s\" (oid was %s)\n",
                                                                          tgname, tblinfo[i].relname, tgconstrrelid);
-                                                       exit_nicely(g_conn);
+                                                       exit_nicely();
                                                }
 
                                                appendPQExpBuffer(query, " FROM %s",
@@ -2593,7 +2584,7 @@ getTables(int *numTables, FuncInfo *finfo, int numFuncs)
                                                                          PQgetvalue(res2, i2, i_tgargs),
                                                                          tgname,
                                                                          tblinfo[i].relname);
-                                                       exit_nicely(g_conn);
+                                                       exit_nicely();
                                                }
                                                p++;
                                                if (*p == '\\')
@@ -2679,7 +2670,7 @@ getInherits(int *numInherits)
        {
                write_msg(NULL, "query to obtain inheritance relationships failed: %s",
                                  PQerrorMessage(g_conn));
-               exit_nicely(g_conn);
+               exit_nicely();
        }
 
        ntups = PQntuples(res);
@@ -2741,10 +2732,8 @@ getTableAttrs(TableInfo *tblinfo, int numTables)
                 * later
                 */
                if (g_verbose)
-                       fprintf(stderr, "%s finding the attrs and types for table: '%s' %s\n",
-                                       g_comment_start,
-                                       tblinfo[i].relname,
-                                       g_comment_end);
+                       write_msg(NULL, "finding the columns and types for table %s\n",
+                                         tblinfo[i].relname);
 
                resetPQExpBuffer(q);
 
@@ -2781,7 +2770,7 @@ getTableAttrs(TableInfo *tblinfo, int numTables)
                        PQresultStatus(res) != PGRES_TUPLES_OK)
                {
                        write_msg(NULL, "query to get table columns failed: %s", PQerrorMessage(g_conn));
-                       exit_nicely(g_conn);
+                       exit_nicely();
                }
 
                ntups = PQntuples(res);
@@ -2814,7 +2803,7 @@ getTableAttrs(TableInfo *tblinfo, int numTables)
                        {
                                write_msg(NULL, "query produced NULL name for data type of column %d of table %s\n",
                                                  j+1, tblinfo[i].relname);
-                               exit_nicely(g_conn);
+                               exit_nicely();
                        }
 
                        tblinfo[i].attoids[j] = strdup(PQgetvalue(res, j, i_attoid));
@@ -2834,10 +2823,8 @@ getTableAttrs(TableInfo *tblinfo, int numTables)
                                int                     numAttr;
 
                                if (g_verbose)
-                                       fprintf(stderr, "%s finding DEFAULT expression for attr: '%s' %s\n",
-                                                       g_comment_start,
-                                                       tblinfo[i].attnames[j],
-                                                       g_comment_end);
+                                       write_msg(NULL, "finding DEFAULT expression for column %s\n",
+                                                         tblinfo[i].attnames[j]);
 
                                resetPQExpBuffer(q);
                                appendPQExpBuffer(q, "SELECT adsrc from pg_attrdef "
@@ -2849,7 +2836,7 @@ getTableAttrs(TableInfo *tblinfo, int numTables)
                                {
                                        write_msg(NULL, "query to get column default value failed: %s",
                                                          PQerrorMessage(g_conn));
-                                       exit_nicely(g_conn);
+                                       exit_nicely();
                                }
 
                                /* Sanity: Check we got only one tuple */
@@ -2858,7 +2845,7 @@ getTableAttrs(TableInfo *tblinfo, int numTables)
                                {
                                        write_msg(NULL, "query to get default value for column \"%s\" returned %d rows; expected 1\n",
                                                          tblinfo[i].attnames[j], numAttr);
-                                       exit_nicely(g_conn);
+                                       exit_nicely();
                                }
 
                                tblinfo[i].adef_expr[j] = strdup(PQgetvalue(res2, 0, PQfnumber(res2, "adsrc")));
@@ -2930,7 +2917,7 @@ getIndexes(int *numIndexes)
                PQresultStatus(res) != PGRES_TUPLES_OK)
        {
                write_msg(NULL, "query to obtain list of indexes failed: %s", PQerrorMessage(g_conn));
-               exit_nicely(g_conn);
+               exit_nicely();
        }
 
        ntups = PQntuples(res);
@@ -3011,7 +2998,7 @@ dumpComment(Archive *fout, const char *target, const char *oid)
        {
                write_msg(NULL, "query to get comment on oid %s failed: %s",
                                   oid, PQerrorMessage(g_conn));
-               exit_nicely(g_conn);
+               exit_nicely();
        }
 
        /*** If a comment exists, build COMMENT ON statement ***/
@@ -3066,7 +3053,7 @@ dumpDBComment(Archive *fout)
        {
                write_msg(NULL, "query to get database oid failed: %s",
                                   PQerrorMessage(g_conn));
-               exit_nicely(g_conn);
+               exit_nicely();
        }
 
        /*** If a comment exists, build COMMENT ON statement ***/
@@ -3164,7 +3151,7 @@ dumpTypes(Archive *fout, FuncInfo *finfo, int numFuncs,
                        elemType = findTypeByOid(tinfo, numTypes, tinfo[i].typelem, zeroAsOpaque);
                        if (elemType == NULL)
                        {
-                               write_msg(NULL, "Notice: array type %s - type for elements (oid %s) is not dumped.\n",
+                               write_msg(NULL, "notice: array type %s - type for elements (oid %s) is not dumped\n",
                                                  tinfo[i].typname, tinfo[i].typelem);
                                resetPQExpBuffer(q);
                                resetPQExpBuffer(delq);
@@ -3233,7 +3220,7 @@ dumpProcLangs(Archive *fout, FuncInfo *finfo, int numFuncs,
        {
                write_msg(NULL, "query to obtain list of procedural languages failed: %s",
                                   PQerrorMessage(g_conn));
-               exit_nicely(g_conn);
+               exit_nicely();
        }
        ntups = PQntuples(res);
 
@@ -3261,7 +3248,7 @@ dumpProcLangs(Archive *fout, FuncInfo *finfo, int numFuncs,
                {
                        write_msg(NULL, "handler procedure for procedural language %s not found\n",
                                           PQgetvalue(res, i, i_lanname));
-                       exit_nicely(g_conn);
+                       exit_nicely();
                }
 
                dumpOneFunc(fout, finfo, fidx, tinfo, numTypes);
@@ -3350,14 +3337,14 @@ dumpOneFunc(Archive *fout, FuncInfo *finfo, int i,
                PQresultStatus(res) != PGRES_TUPLES_OK)
        {
                write_msg(NULL, "query to get name of procedural language failed: %s", PQerrorMessage(g_conn));
-               exit_nicely(g_conn);
+               exit_nicely();
        }
        nlangs = PQntuples(res);
 
        if (nlangs != 1)
        {
                write_msg(NULL, "procedural language for function %s not found\n", finfo[i].proname);
-               exit_nicely(g_conn);
+               exit_nicely();
        }
 
        i_lanname = PQfnumber(res, "lanname");
@@ -3398,10 +3385,10 @@ dumpOneFunc(Archive *fout, FuncInfo *finfo, int i,
                typname = findTypeByOid(tinfo, numTypes, finfo[i].argtypes[j], zeroAsOpaque);
                if (typname == NULL)
                {
-                       write_msg(NULL, "Notice: function \"%s\" not dumped\n",
-                                          finfo[i].proname);
+                       write_msg(NULL, "WARNING: function \"%s\" not dumped\n",
+                                         finfo[i].proname);
 
-                       write_msg(NULL, "Reason: data type name of argument %d (oid %s) not found\n",
+                       write_msg(NULL, "reason: data type name of argument %d (oid %s) not found\n",
                                           j, finfo[i].argtypes[j]);
                        resetPQExpBuffer(q);
                        resetPQExpBuffer(fn);
@@ -3427,11 +3414,11 @@ dumpOneFunc(Archive *fout, FuncInfo *finfo, int i,
 
        if (rettypename == NULL)
        {
-               write_msg(NULL, "Notice: function \"%s\" not dumped\n",
-                                  finfo[i].proname);
+               write_msg(NULL, "WARNING: function \"%s\" not dumped\n",
+                                 finfo[i].proname);
 
-               write_msg(NULL, "Reason: name of return data type (oid %s) not found\n",
-                                  finfo[i].prorettype);
+               write_msg(NULL, "reason: name of return data type (oid %s) not found\n",
+                                 finfo[i].prorettype);
                resetPQExpBuffer(q);
                resetPQExpBuffer(fn);
                resetPQExpBuffer(delqry);
@@ -3491,12 +3478,6 @@ void
 dumpOprs(Archive *fout, OprInfo *oprinfo, int numOperators,
                 TypeInfo *tinfo, int numTypes)
 {
-#define OPR_NOTICE(arg) {\
-               fprintf(stderr, "Notice: operator \"%s\"(oid %s) is not dumped.\n",oprinfo[i].oprname, oprinfo[i].oid);\
-       fprintf(stderr, "Reason: " CppAsString(arg));\
-       fprintf (stderr, " (oid %s) not found.\n",oprinfo[i].arg);\
-       }
-
        int                     i;
        PQExpBuffer q = createPQExpBuffer();
        PQExpBuffer delq = createPQExpBuffer();
@@ -3544,7 +3525,10 @@ dumpOprs(Archive *fout, OprInfo *oprinfo, int numOperators,
                                                                 oprinfo[i].oprleft, zeroAsOpaque);
                        if (name == NULL)
                        {
-                               OPR_NOTICE(oprleft);
+                               write_msg(NULL, "WARNING: operator \"%s\" (oid %s) not dumped\n",
+                                                 oprinfo[i].oprname, oprinfo[i].oid);
+                               write_msg(NULL, "reason: oprleft (oid %s) not found\n",
+                                                 oprinfo[i].oprleft);
                                continue;
                        }
                        appendPQExpBuffer(leftarg, ",\n\tLEFTARG = %s ", name);
@@ -3557,7 +3541,10 @@ dumpOprs(Archive *fout, OprInfo *oprinfo, int numOperators,
                                                                 oprinfo[i].oprright, zeroAsOpaque);
                        if (name == NULL)
                        {
-                               OPR_NOTICE(oprright);
+                               write_msg(NULL, "WARNING: operator \"%s\" (oid %s) not dumped\n",
+                                                 oprinfo[i].oprname, oprinfo[i].oid);
+                               write_msg(NULL, "reason: oprright (oid %s) not found\n",
+                                                 oprinfo[i].oprright);
                                continue;
                        }
                        appendPQExpBuffer(rightarg, ",\n\tRIGHTARG = %s ", name);
@@ -3568,7 +3555,10 @@ dumpOprs(Archive *fout, OprInfo *oprinfo, int numOperators,
                        name = findOprByOid(oprinfo, numOperators, oprinfo[i].oprcom);
                        if (name == NULL)
                        {
-                               OPR_NOTICE(oprcom);
+                               write_msg(NULL, "WARNING: operator \"%s\" (oid %s) not dumped\n",
+                                                 oprinfo[i].oprname, oprinfo[i].oid);
+                               write_msg(NULL, "reason: oprcom (oid %s) not found\n",
+                                                 oprinfo[i].oprcom);
                                continue;
                        }
                        appendPQExpBuffer(commutator, ",\n\tCOMMUTATOR = %s ", name);
@@ -3579,7 +3569,10 @@ dumpOprs(Archive *fout, OprInfo *oprinfo, int numOperators,
                        name = findOprByOid(oprinfo, numOperators, oprinfo[i].oprnegate);
                        if (name == NULL)
                        {
-                               OPR_NOTICE(oprnegate);
+                               write_msg(NULL, "WARNING: operator \"%s\" (oid %s) not dumped\n",
+                                                 oprinfo[i].oprname, oprinfo[i].oid);
+                               write_msg(NULL, "reason: oprnegate (oid %s) not found\n",
+                                                 oprinfo[i].oprnegate);
                                continue;
                        }
                        appendPQExpBuffer(negator, ",\n\tNEGATOR = %s ", name);
@@ -3596,7 +3589,10 @@ dumpOprs(Archive *fout, OprInfo *oprinfo, int numOperators,
                        name = findOprByOid(oprinfo, numOperators, oprinfo[i].oprlsortop);
                        if (name == NULL)
                        {
-                               OPR_NOTICE(oprlsortop);
+                               write_msg(NULL, "WARNING: operator \"%s\" (oid %s) not dumped\n",
+                                                 oprinfo[i].oprname, oprinfo[i].oid);
+                               write_msg(NULL, "reason: oprlsortop (oid %s) not found\n",
+                                                 oprinfo[i].oprlsortop);
                                continue;
                        }
                        appendPQExpBuffer(sort1, ",\n\tSORT1 = %s ", name);
@@ -3607,7 +3603,10 @@ dumpOprs(Archive *fout, OprInfo *oprinfo, int numOperators,
                        name = findOprByOid(oprinfo, numOperators, oprinfo[i].oprrsortop);
                        if (name == NULL)
                        {
-                               OPR_NOTICE(oprrsortop);
+                               write_msg(NULL, "WARNING: operator \"%s\" (oid %s) not dumped\n",
+                                                 oprinfo[i].oprname, oprinfo[i].oid);
+                               write_msg(NULL, "reason: oprrsortop (oid %s) not found\n",
+                                                 oprinfo[i].oprrsortop);
                                continue;
                        }
                        appendPQExpBuffer(sort2, ",\n\tSORT2 = %s ", name);
@@ -3649,16 +3648,6 @@ void
 dumpAggs(Archive *fout, AggInfo *agginfo, int numAggs,
                 TypeInfo *tinfo, int numTypes)
 {
-#define AGG_NOTICE(arg) {\
-               resetPQExpBuffer(q);\
-               appendPQExpBuffer(q, "-- Notice: aggregate \"%s\"(oid %s) is not dumped.\n",agginfo[i].aggname, agginfo[i].oid);\
-               appendPQExpBuffer(q, "-- Reason: " CppAsString(arg) );\
-               appendPQExpBuffer(q, " (oid %s) not found.\n",agginfo[i].arg);\
-               fprintf(stderr, q->data);\
-               ArchiveEntry(fout, agginfo[i].oid, aggSig->data, "WARNING", NULL,\
-                                       q->data, "" /* Del */, "", agginfo[i].usename, NULL, NULL);\
-       }
-
        int                     i;
        PQExpBuffer q = createPQExpBuffer();
        PQExpBuffer delq = createPQExpBuffer();
@@ -3681,11 +3670,12 @@ dumpAggs(Archive *fout, AggInfo *agginfo, int numAggs,
 
                if (!agginfo[i].convertok)
                {
+                       write_msg(NULL, "WARNING: aggregate function %s could not be dumped correctly for this database version; ignored\n",
+                                         aggSig->data);
+
                        resetPQExpBuffer(q);
-                       appendPQExpBuffer(q, "-- WARNING: Aggregate %s could not be dumped correctly for this database version - ignored\n",
+                       appendPQExpBuffer(q, "-- WARNING: aggregate function %s could not be dumped correctly for this database version; ignored\n",
                                                                        aggSig->data);
-                       fprintf(stderr, q->data);
-
                        ArchiveEntry(fout, agginfo[i].oid, aggSig->data, "WARNING", NULL,
                                        q->data, "" /* Del */, "", agginfo[i].usename, NULL, NULL);
                        continue;
@@ -3694,7 +3684,16 @@ dumpAggs(Archive *fout, AggInfo *agginfo, int numAggs,
                name = findTypeByOid(tinfo, numTypes, agginfo[i].aggbasetype, zeroAsAny + useBaseTypeName);
                if (name == NULL)
                {
-                       AGG_NOTICE(aggbasetype);
+                       write_msg(NULL, "WARNING: aggregate function \"%s\" (oid %s) not dumped\n",
+                                         agginfo[i].aggname, agginfo[i].oid);
+                       write_msg(NULL, "reason: aggbasetype (oid %s) not found\n",
+                                         agginfo[i].aggbasetype);
+
+                       resetPQExpBuffer(q);
+                       appendPQExpBuffer(q, "-- WARNING: aggregate function \"%s\" (oid %s) not dumped\n", agginfo[i].aggname, agginfo[i].oid);
+                       appendPQExpBuffer(q, "-- reason: aggbasetype (oid %s) not found\n", agginfo[i].aggbasetype);
+                       ArchiveEntry(fout, agginfo[i].oid, aggSig->data, "WARNING", NULL,
+                                                q->data, "" /* Del */, "", agginfo[i].usename, NULL, NULL);
                        continue;
                }
                appendPQExpBuffer(details, "BASETYPE = %s, ", name);
@@ -3702,7 +3701,16 @@ dumpAggs(Archive *fout, AggInfo *agginfo, int numAggs,
                name = findTypeByOid(tinfo, numTypes, agginfo[i].aggtranstype, zeroAsOpaque + useBaseTypeName);
                if (name == NULL)
                {
-                       AGG_NOTICE(aggtranstype);
+                       write_msg(NULL, "WARNING: aggregate function \"%s\" (oid %s) not dumped\n",
+                                         agginfo[i].aggname, agginfo[i].oid);
+                       write_msg(NULL, "reason: aggtranstype (oid %s) not found\n",
+                                         agginfo[i].aggtranstype);
+
+                       resetPQExpBuffer(q);
+                       appendPQExpBuffer(q, "-- WARNING: aggregate function \"%s\" (oid %s) not dumped\n", agginfo[i].aggname, agginfo[i].oid);
+                       appendPQExpBuffer(q, "-- reason: aggtranstype (oid %s) not found\n", agginfo[i].aggtranstype);
+                       ArchiveEntry(fout, agginfo[i].oid, aggSig->data, "WARNING", NULL,
+                                                q->data, "" /* Del */, "", agginfo[i].usename, NULL, NULL);
                        continue;
                }
                appendPQExpBuffer(details,
@@ -3859,9 +3867,9 @@ dumpACL(Archive *fout, TableInfo tbinfo)
                eqpos = strchr(tok, '=');
                if (!eqpos)
                {
-                       fprintf(stderr, "Could not parse ACL list ('%s') for '%s'...Exiting!\n",
-                                       acls, tbinfo.relname);
-                       exit_nicely(g_conn);
+                       write_msg(NULL, "could not parse ACL list ('%s') for relation %s\n",
+                                         acls, tbinfo.relname);
+                       exit_nicely();
                }
 
                /*
@@ -4102,7 +4110,7 @@ dumpTables(Archive *fout, TableInfo *tblinfo, int numTables,
                                        {
                                                write_msg(NULL, "dumpTables(): failed sanity check, could not find index (%s) for primary key constraint\n",
                                                                   tblinfo[i].pkIndexOid);
-                                               exit_nicely(g_conn);
+                                               exit_nicely();
                                        }
 
                                        consDef = getPKconstraint(&tblinfo[i], &indinfo[k]);
@@ -4226,7 +4234,7 @@ getAttrName(int attrnum, TableInfo *tblInfo)
        }
        write_msg(NULL, "getAttrName(): invalid column number %d for table %s\n",
                           attrnum, tblInfo->relname);
-       exit_nicely(g_conn);
+       exit_nicely();
        return NULL;                            /* keep compiler quiet */
 }
 
@@ -4262,29 +4270,29 @@ dumpIndexes(Archive *fout, IndInfo *indinfo, int numIndexes,
                {
                        write_msg(NULL, "dumpIndexes(): failed sanity check, table %s was not found\n",
                                           indinfo[i].indrelname);
-                       exit(1);
+                       exit_nicely();
                }
 
                /* Handle PK indexes */
                if (strcmp(indinfo[i].indisprimary, "t") == 0)
                {
-/*
- *                     ***PK: Enable this code when ALTER TABLE supports PK constraints. ***
- *
*                     PQExpBuffer consDef = getPKconstraint(&tblinfo[tableInd], &indinfo[i]);
- *
*                     resetPQExpBuffer(attlist);
- *
*                     appendPQExpBuffer(attlist, "Alter Table %s Add %s;",
*                                                             fmtId(tblinfo[tableInd].relname, force_quotes),
*                                                             consDef->data);
- *
*                     ArchiveEntry(fout, indinfo[i].oid, tblinfo[tableInd].primary_key_name, "CONSTRAINT", NULL,
*                                                     attlist->data, "",
*                                                     "", tblinfo[tableInd].usename, NULL, NULL);
- *
*                     destroyPQExpBuffer(consDef);
- */
+#if 0
+                       /* PK: Enable this code when ALTER TABLE supports PK constraints. */
+
                      PQExpBuffer consDef = getPKconstraint(&tblinfo[tableInd], &indinfo[i]);
+
                      resetPQExpBuffer(attlist);
+
                      appendPQExpBuffer(attlist, "Alter Table %s Add %s;",
+                                                         fmtId(tblinfo[tableInd].relname, force_quotes),
+                                                         consDef->data);
+
                      ArchiveEntry(fout, indinfo[i].oid, tblinfo[tableInd].primary_key_name,
                                               "CONSTRAINT", NULL, attlist->data, "",
+                                                "", tblinfo[tableInd].usename, NULL, NULL);
+
                      destroyPQExpBuffer(consDef);
+#endif
 
                        /*
                         * Don't need to do anything else for this system-generated
@@ -4316,7 +4324,7 @@ dumpIndexes(Archive *fout, IndInfo *indinfo, int numIndexes,
                        {
                                write_msg(NULL, "query to get function name of oid %s failed: %s",
                                                  indinfo[i].indproc, PQerrorMessage(g_conn));
-                               exit_nicely(g_conn);
+                               exit_nicely();
                        }
 
                        /* Sanity: Check we got only one tuple */
@@ -4325,7 +4333,7 @@ dumpIndexes(Archive *fout, IndInfo *indinfo, int numIndexes,
                        {
                                write_msg(NULL, "query to get function name of oid %s returned %d rows; expected 1\n",
                                                  indinfo[i].indproc, numFuncs);
-                               exit_nicely(g_conn);
+                               exit_nicely();
                        }
 
                        funcname = strdup(PQgetvalue(res, 0, PQfnumber(res, "proname")));
@@ -4350,7 +4358,7 @@ dumpIndexes(Archive *fout, IndInfo *indinfo, int numIndexes,
                        {
                                write_msg(NULL, "query to get operator class name of oid %u failed: %s",
                                                  indclass, PQerrorMessage(g_conn));
-                               exit_nicely(g_conn);
+                               exit_nicely();
                        }
 
                        /* Sanity: Check we got only one tuple */
@@ -4359,7 +4367,7 @@ dumpIndexes(Archive *fout, IndInfo *indinfo, int numIndexes,
                        {
                                write_msg(NULL, "query to get operator class name of oid %u returned %d rows; expected 1\n",
                                                  indclass, numRows);
-                               exit_nicely(g_conn);
+                               exit_nicely();
                        }
 
                        classname[nclass] = strdup(PQgetvalue(res, 0, PQfnumber(res, "opcname")));
@@ -4370,7 +4378,7 @@ dumpIndexes(Archive *fout, IndInfo *indinfo, int numIndexes,
                {
                        write_msg(NULL, "There must be exactly one OpClass for functional index \"%s\".\n",
                                          indinfo[i].indexrelname);
-                       exit_nicely(g_conn);
+                       exit_nicely();
                }
 
                /* convert attribute numbers into attribute list */
@@ -4394,7 +4402,7 @@ dumpIndexes(Archive *fout, IndInfo *indinfo, int numIndexes,
                                {
                                        write_msg(NULL, "no operator class found for column \"%s\" of index \"%s\"\n",
                                                        attname, indinfo[i].indexrelname);
-                                       exit_nicely(g_conn);
+                                       exit_nicely();
                                }
                                resetPQExpBuffer(id1);
                                resetPQExpBuffer(id2);
@@ -4535,7 +4543,7 @@ setMaxOid(Archive *fout)
                PQresultStatus(res) != PGRES_COMMAND_OK)
        {
                write_msg(NULL, "could not create pgdump_oid table: %s", PQerrorMessage(g_conn));
-               exit_nicely(g_conn);
+               exit_nicely();
        }
        PQclear(res);
        res = PQexec(g_conn, "INSERT INTO pgdump_oid VALUES (0)");
@@ -4543,13 +4551,13 @@ setMaxOid(Archive *fout)
                PQresultStatus(res) != PGRES_COMMAND_OK)
        {
                write_msg(NULL, "could not insert into pgdump_oid table: %s", PQerrorMessage(g_conn));
-               exit_nicely(g_conn);
+               exit_nicely();
        }
        max_oid = atol(PQoidStatus(res));
        if (max_oid == 0)
        {
                write_msg(NULL, "inserted invalid oid\n");
-               exit_nicely(g_conn);
+               exit_nicely();
        }
        PQclear(res);
        res = PQexec(g_conn, "DROP TABLE pgdump_oid;");
@@ -4557,12 +4565,11 @@ setMaxOid(Archive *fout)
                PQresultStatus(res) != PGRES_COMMAND_OK)
        {
                write_msg(NULL, "could not drop pgdump_oid table: %s", PQerrorMessage(g_conn));
-               exit_nicely(g_conn);
+               exit_nicely();
        }
        PQclear(res);
        if (g_verbose)
-               fprintf(stderr, "%s maximum system oid is %u %s\n",
-                               g_comment_start, max_oid, g_comment_end);
+               write_msg(NULL, "maximum system oid is %u\n", max_oid);
        snprintf(sql, 1024,
                         "CREATE TEMPORARY TABLE pgdump_oid (dummy int4);\n"
                         "COPY pgdump_oid WITH OIDS FROM stdin;\n"
@@ -4597,18 +4604,18 @@ findLastBuiltinOid_V71(const char *dbname)
                PQresultStatus(res) != PGRES_TUPLES_OK)
        {
                write_msg(NULL, "error in finding the last system oid: %s", PQerrorMessage(g_conn));
-               exit_nicely(g_conn);
+               exit_nicely();
        }
        ntups = PQntuples(res);
        if (ntups < 1)
        {
                write_msg(NULL, "missing pg_database entry for this database\n");
-               exit_nicely(g_conn);
+               exit_nicely();
        }
        if (ntups > 1)
        {
                write_msg(NULL, "found more than one pg_database entry for this database\n");
-               exit_nicely(g_conn);
+               exit_nicely();
        }
        last_oid = atooid(PQgetvalue(res, 0, PQfnumber(res, "datlastsysoid")));
        PQclear(res);
@@ -4635,18 +4642,18 @@ findLastBuiltinOid_V70(void)
                PQresultStatus(res) != PGRES_TUPLES_OK)
        {
                write_msg(NULL, "error in finding the template1 database: %s", PQerrorMessage(g_conn));
-               exit_nicely(g_conn);
+               exit_nicely();
        }
        ntups = PQntuples(res);
        if (ntups < 1)
        {
                write_msg(NULL, "could not find template1 database entry in the pg_database table\n");
-               exit_nicely(g_conn);
+               exit_nicely();
        }
        if (ntups > 1)
        {
                write_msg(NULL, "found more than one template1 database entry in the pg_database table\n");
-               exit_nicely(g_conn);
+               exit_nicely();
        }
        last_oid = atooid(PQgetvalue(res, 0, PQfnumber(res, "oid")));
        PQclear(res);
@@ -4677,21 +4684,21 @@ dumpSequence(Archive *fout, TableInfo tbinfo, const bool schemaOnly, const bool
        if (!res || PQresultStatus(res) != PGRES_TUPLES_OK)
        {
                write_msg(NULL, "query to get data of sequence \"%s\" failed: %s", tbinfo.relname, PQerrorMessage(g_conn));
-               exit_nicely(g_conn);
+               exit_nicely();
        }
 
        if (PQntuples(res) != 1)
        {
                write_msg(NULL, "query to get data of sequence \"%s\" returned %d rows (expected 1)\n",
                                   tbinfo.relname, PQntuples(res));
-               exit_nicely(g_conn);
+               exit_nicely();
        }
 
        if (strcmp(PQgetvalue(res, 0, 0), tbinfo.relname) != 0)
        {
                write_msg(NULL, "query to get data of sequence \"%s\" returned name \"%s\"\n",
                                   tbinfo.relname, PQgetvalue(res, 0, 0));
-               exit_nicely(g_conn);
+               exit_nicely();
        }
 
 
@@ -4764,8 +4771,7 @@ dumpTriggers(Archive *fout, const char *tablename,
                                j;
 
        if (g_verbose)
-               fprintf(stderr, "%s dumping out triggers %s\n",
-                               g_comment_start, g_comment_end);
+               write_msg(NULL, "dumping out triggers\n");
 
        for (i = 0; i < numTables; i++)
        {
@@ -4799,8 +4805,7 @@ dumpRules(Archive *fout, const char *tablename,
        int                     i_rulename;
 
        if (g_verbose)
-               fprintf(stderr, "%s dumping out rules %s\n",
-                               g_comment_start, g_comment_end);
+               write_msg(NULL, "dumping out rules\n");
 
        /*
         * For each table we dump
@@ -4834,7 +4839,7 @@ dumpRules(Archive *fout, const char *tablename,
                {
                        write_msg(NULL, "query to get rules associated with table \"%s\" failed: %s",
                                           tblinfo[t].relname, PQerrorMessage(g_conn));
-                       exit_nicely(g_conn);
+                       exit_nicely();
                }
 
                nrules = PQntuples(res);
index 7494083..a1a3beb 100644 (file)
@@ -6,7 +6,7 @@
  * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $Id: pg_dump.h,v 1.64 2001/06/27 21:21:37 petere Exp $
+ * $Id: pg_dump.h,v 1.65 2001/07/03 20:21:50 petere Exp $
  *
  * Modifications - 6/12/96 - dave@bensoft.com - version 1.13.dhb.2
  *
@@ -275,5 +275,6 @@ extern void dumpTables(Archive *fout, TableInfo *tbinfo, int numTables,
 extern void dumpIndexes(Archive *fout, IndInfo *indinfo, int numIndexes,
                        TableInfo *tbinfo, int numTables, const char *tablename);
 extern const char *fmtId(const char *identifier, bool force_quotes);
+extern void exit_nicely(void);
 
 #endif  /* PG_DUMP_H */
index a058f06..50eac5c 100644 (file)
@@ -34,7 +34,7 @@
  *
  *
  * IDENTIFICATION
- *             $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_restore.c,v 1.21 2001/06/27 21:21:37 petere Exp $
+ *             $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_restore.c,v 1.22 2001/07/03 20:21:50 petere Exp $
  *
  * Modifications - 28-Jun-2000 - pjw@rhyme.com.au
  *
@@ -248,7 +248,7 @@ main(int argc, char **argv)
 
                        case 'u':
                                opts->requirePassword = true;
-                               opts->username = simple_prompt("Username: ", 100, true);
+                               opts->username = simple_prompt("User name: ", 100, true);
                                break;
 
                        case 'U':
index 51727b4..2b6a9e0 100644 (file)
@@ -12,7 +12,7 @@
  * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $Id: c.h,v 1.95 2001/06/03 14:53:56 petere Exp $
+ * $Id: c.h,v 1.96 2001/07/03 20:21:50 petere Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -73,6 +73,8 @@
 #else
 #define gettext(x) (x)
 #endif
+#define gettext_noop(x) (x)
+
 
 /* ----------------------------------------------------------------
  *                             Section 1: hacks to cope with non-ANSI C compilers