projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
795e107
)
Fix lo_export usage in example programs.
author
Tom Lane
Tue, 9 Oct 2012 01:18:51 +0000
(21:18 -0400)
committer
Tom Lane
Tue, 9 Oct 2012 01:18:51 +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 acc9edd775f0938c1540db2659f1c6e5ff051196..d11560f98cf72071cd527a04d3a7827625ea58fe 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));
}