projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
27930be
)
Fix lo_export usage in example programs.
author
Tom Lane
<
[email protected]
>
Tue, 9 Oct 2012 01:19:13 +0000
(21:19 -0400)
committer
Tom Lane
<
[email protected]
>
Tue, 9 Oct 2012 01:19:13 +0000
(21:19 -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 83e37bd7a1aa0d525f4949477d0ded450a5b82b1..763d3bfce00ec5c79688d4fd1061775b1a1949f1 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));
}