Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
f52c5165
Commit
f52c5165
authored
Oct 08, 2012
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix lo_export usage in example programs.
lo_export returns -1, not zero, on failure.
parent
0e924c00
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
src/test/examples/testlo.c
src/test/examples/testlo.c
+1
-1
src/test/examples/testlo64.c
src/test/examples/testlo64.c
+2
-2
No files found.
src/test/examples/testlo.c
View file @
f52c5165
...
@@ -251,7 +251,7 @@ main(int argc, char **argv)
...
@@ -251,7 +251,7 @@ main(int argc, char **argv)
printf
(
"exporting large object to file
\"
%s
\"
...
\n
"
,
out_filename
);
printf
(
"exporting large object to file
\"
%s
\"
...
\n
"
,
out_filename
);
/* exportFile(conn, lobjOid, 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
));
fprintf
(
stderr
,
"%s
\n
"
,
PQerrorMessage
(
conn
));
}
}
...
...
src/test/examples/testlo64.c
View file @
f52c5165
...
@@ -275,14 +275,14 @@ main(int argc, char **argv)
...
@@ -275,14 +275,14 @@ main(int argc, char **argv)
printf
(
"exporting large object to file
\"
%s
\"
...
\n
"
,
out_filename
);
printf
(
"exporting large object to file
\"
%s
\"
...
\n
"
,
out_filename
);
/* exportFile(conn, lobjOid, 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
));
fprintf
(
stderr
,
"%s
\n
"
,
PQerrorMessage
(
conn
));
printf
(
"truncating to 3294968000 bytes
\n
"
);
printf
(
"truncating to 3294968000 bytes
\n
"
);
my_truncate
(
conn
,
lobjOid
,
3294968000U
);
my_truncate
(
conn
,
lobjOid
,
3294968000U
);
printf
(
"exporting truncated large object to file
\"
%s
\"
...
\n
"
,
out_filename2
);
printf
(
"exporting truncated large object to file
\"
%s
\"
...
\n
"
,
out_filename2
);
if
(
!
lo_export
(
conn
,
lobjOid
,
out_filename2
)
)
if
(
lo_export
(
conn
,
lobjOid
,
out_filename2
)
<
0
)
fprintf
(
stderr
,
"%s
\n
"
,
PQerrorMessage
(
conn
));
fprintf
(
stderr
,
"%s
\n
"
,
PQerrorMessage
(
conn
));
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment