aboutsummaryrefslogtreecommitdiff
path: root/src/bin/pg_dump/pg_backup_archiver.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/pg_dump/pg_backup_archiver.c')
-rw-r--r--src/bin/pg_dump/pg_backup_archiver.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/bin/pg_dump/pg_backup_archiver.c b/src/bin/pg_dump/pg_backup_archiver.c
index 939556a5720..4c99d51bfed 100644
--- a/src/bin/pg_dump/pg_backup_archiver.c
+++ b/src/bin/pg_dump/pg_backup_archiver.c
@@ -15,7 +15,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.37 2001/11/05 17:46:30 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.38 2001/11/08 04:05:12 tgl Exp $
*
* Modifications - 28-Jun-2000 - pjw@rhyme.com.au
*
@@ -1226,10 +1226,11 @@ ahwrite(const void *ptr, size_t size, size_t nmemb, ArchiveHandle *AH)
if (AH->writingBlob)
{
res = lo_write(AH->connection, AH->loFd, (void *) ptr, size * nmemb);
- ahlog(AH, 5, "wrote %d bytes of large object data (result = %d)\n", size * nmemb, res);
- if (res < size * nmemb)
+ ahlog(AH, 5, "wrote %d bytes of large object data (result = %d)\n",
+ (int) (size * nmemb), res);
+ if (res != size * nmemb)
die_horribly(AH, modulename, "could not write to large object (result: %d, expected: %d)\n",
- res, size * nmemb);
+ res, (int) (size * nmemb));
return res;
}
@@ -1260,7 +1261,8 @@ ahwrite(const void *ptr, size_t size, size_t nmemb, ArchiveHandle *AH)
{
res = fwrite((void *) ptr, size, nmemb, AH->OF);
if (res != nmemb)
- die_horribly(AH, modulename, "could not write to output file (%d != %d)\n", res, nmemb);
+ die_horribly(AH, modulename, "could not write to output file (%d != %d)\n",
+ res, (int) nmemb);
return res;
}
}