diff options
Diffstat (limited to 'src/interfaces/libpq/fe-lobj.c')
| -rw-r--r-- | src/interfaces/libpq/fe-lobj.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/interfaces/libpq/fe-lobj.c b/src/interfaces/libpq/fe-lobj.c index 822ccfe11d6..16d4970d9eb 100644 --- a/src/interfaces/libpq/fe-lobj.c +++ b/src/interfaces/libpq/fe-lobj.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/interfaces/libpq/fe-lobj.c,v 1.46 2004/01/07 18:56:29 neilc Exp $ + * $PostgreSQL: pgsql/src/interfaces/libpq/fe-lobj.c,v 1.47 2004/01/26 22:35:32 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -491,7 +491,7 @@ lo_export(PGconn *conn, Oid lobjId, const char *filename) } /* - * read in from the Unix file and write to the inversion file + * read in from the inversion file and write to the Unix file */ while ((nbytes = lo_read(conn, lobj, buf, LO_BUFSIZE)) > 0) { @@ -508,7 +508,14 @@ lo_export(PGconn *conn, Oid lobjId, const char *filename) } (void) lo_close(conn, lobj); - (void) close(fd); + + if (close(fd)) + { + printfPQExpBuffer(&conn->errorMessage, + libpq_gettext("error while writing to file \"%s\"\n"), + filename); + return -1; + } return 1; } |
