1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-24 14:22:24 +03:00

Also print the libpq error message when lo_create or lo_open fails

This commit is contained in:
Peter Eisentraut
2010-03-18 20:00:51 +00:00
parent a401226bd8
commit 2827516394
2 changed files with 8 additions and 8 deletions

View File

@ -15,7 +15,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.182 2010/02/26 02:01:16 momjian Exp $
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.183 2010/03/18 20:00:51 petere Exp $
*
*-------------------------------------------------------------------------
*/
@ -935,13 +935,13 @@ StartRestoreBlob(ArchiveHandle *AH, Oid oid, bool drop)
{
loOid = lo_create(AH->connection, oid);
if (loOid == 0 || loOid != oid)
die_horribly(AH, modulename, "could not create large object %u\n",
oid);
die_horribly(AH, modulename, "could not create large object %u: %s",
oid, PQerrorMessage(AH->connection));
}
AH->loFd = lo_open(AH->connection, oid, INV_WRITE);
if (AH->loFd == -1)
die_horribly(AH, modulename, "could not open large object %u\n",
oid);
die_horribly(AH, modulename, "could not open large object %u: %s",
oid, PQerrorMessage(AH->connection));
}
else
{