Binary large object processing problems
Raivo Rebane <raivore55@gmail.com>
From: Raivo Rebane <raivore55@gmail.com>
To: pgsql-general@postgresql.org
Date: 2023-03-13T15:00:52Z
Lists: pgsql-general
Hi
I am novice in pogres C API user and I want to store Binary Large Object
into database from C language program.
I am using following source :
Oid nloid = lo_import(conn, FileFUllName.c_str());
if (nloid == 0) {
std::cerr << "Error importing large object: " << PQerrorMessage(conn) <<
std::endl;
return -1;
}
else {
std::cout << "Large object imported successfully with fd " << nloid <<
std::endl;
}
And I seadely get 0 from lo_import.
I tried to create it previously an send oid to lo_impor_with_oid, but with
error
Can anybody help me find where is my mistake an what is working solution ?
Regards,
Raivo