projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3c85670
)
Fix lo_export usage in example programs.
author
Tom Lane
<tgl@sss.pgh.pa.us>
Tue, 9 Oct 2012 01:18:57 +0000
(21:18 -0400)
committer
Tom Lane
<tgl@sss.pgh.pa.us>
Tue, 9 Oct 2012 01:18:57 +0000
(21:18 -0400)
lo_export returns -1, not zero, on failure.
src/test/examples/testlo.c
patch
|
blob
|
blame
|
history
diff --git
a/src/test/examples/testlo.c
b/src/test/examples/testlo.c
index 3fd97de995caa672891d18b97de2001d590bfa45..04539edd41764c8e90db01f50061df09816efa07 100644
(file)
--- a/
src/test/examples/testlo.c
+++ b/
src/test/examples/testlo.c
@@
-251,7
+251,7
@@
main(int argc, char **argv)
printf("exporting large object to file \"%s\" ...\n", out_filename);
/* exportFile(conn, lobjOid, out_filename); */
- if (
!lo_export(conn, lobjOid, out_filename)
)
+ if (
lo_export(conn, lobjOid, out_filename) < 0
)
fprintf(stderr, "%s\n", PQerrorMessage(conn));
}