Commit 30ab5bd4 authored by Peter Eisentraut's avatar Peter Eisentraut

More message munging and localization for pg_dump, especially the

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