summaryrefslogtreecommitdiff
path: root/src/bin/pg_dump/pg_backup_files.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2006-05-22 11:21:54 +0000
committerPeter Eisentraut <peter_e@gmx.net>2006-05-22 11:21:54 +0000
commit79e371037b960208c7febb4b292fb701a3f2a862 (patch)
tree75ba34f3c29966e5b285b320226054d322bfafa1 /src/bin/pg_dump/pg_backup_files.c
parente9cc53025ad4bf3a1a7287192ba47fbbf4aac826 (diff)
downloadpostgresql-79e371037b960208c7febb4b292fb701a3f2a862.tar.gz
Add strerror to pg_dump error messages where missing.
Diffstat (limited to 'src/bin/pg_dump/pg_backup_files.c')
-rw-r--r--src/bin/pg_dump/pg_backup_files.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/bin/pg_dump/pg_backup_files.c b/src/bin/pg_dump/pg_backup_files.c
index b36a1c8600..b882598f77 100644
--- a/src/bin/pg_dump/pg_backup_files.c
+++ b/src/bin/pg_dump/pg_backup_files.c
@@ -20,7 +20,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_files.c,v 1.27 2005/10/15 02:49:38 momjian Exp $
+ * $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_files.c,v 1.28 2006/05/22 11:21:54 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -243,7 +243,7 @@ _StartData(ArchiveHandle *AH, TocEntry *te)
#endif
if (tctx->FH == NULL)
- die_horribly(AH, modulename, "could not open data file for output\n");
+ die_horribly(AH, modulename, "could not open output file: %s\n", strerror(errno));
}
static size_t
@@ -287,7 +287,7 @@ _PrintFileData(ArchiveHandle *AH, char *filename, RestoreOptions *ropt)
#endif
if (AH->FH == NULL)
- die_horribly(AH, modulename, "could not open data file for input\n");
+ die_horribly(AH, modulename, "could not open input file: %s\n", strerror(errno));
while ((cnt = GZREAD(buf, 1, 4095, AH->FH)) > 0)
{
@@ -411,7 +411,7 @@ _WriteBuf(ArchiveHandle *AH, const void *buf, size_t len)
res = fwrite(buf, 1, len, AH->FH);
if (res != len)
- die_horribly(AH, modulename, "write error in _WriteBuf (%lu != %lu)\n", (unsigned long) res, (unsigned long) len);
+ die_horribly(AH, modulename, "could not write to output file: %s\n", strerror(errno));
ctx->filePos += res;
return res;
@@ -508,7 +508,7 @@ _StartBlob(ArchiveHandle *AH, TocEntry *te, Oid oid)
#endif
if (tctx->FH == NULL)
- die_horribly(AH, modulename, "could not open large object file\n");
+ die_horribly(AH, modulename, "could not open large object file for input: %s\n", strerror(errno));
}
/*