lo_import invalid large object descriptor

From: Markus Mehrwald <mehrwald(at)ira(dot)uka(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: lo_import invalid large object descriptor
Date: 2008-07-14 16:07:22
Message-ID: 487B79BA.2060902@ira.uka.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

I tried to insert an image in my database with lo_import. The error I
get is "invalid large object descriptor: 0". If I try to create an oid I
get a valid one but with lo_import it seems not to work. The connection
is ok as well.
The folloing code produces the output after the code.

if (PQstatus(connDB) == CONNECTION_OK)
std::cout << "CONNECTION_OK" << std::endl;
Oid oid = lo_creat(connDB, INV_READ | INV_WRITE);
std::cout << oid << std::endl;
std::cout << PQerrorMessage(connDB) << std::endl;
std::cout << lo_import(connDB, "/tmp/image.vtk") << std::endl;
std::cout << PQerrorMessage(connDB) << std::endl;

Output:
CONNECTION_OK
25211

0
FEHLER: ungültiger Large-Object-Deskriptor: 0

Here is the version string of my db:
PostgreSQL 8.3.3 on x86_64-redhat-linux-gnu, compiled by GCC gcc (GCC)
4.3.0 20080428 (Red Hat 4.3.0-8)

Can anyone tell me please what is wrong?

Thank you,
Markus

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Decibel! 2008-07-14 16:25:21 Re: Feature: FOR UPDATE SKIP LOCKED
Previous Message Raymond O'Donnell 2008-07-14 09:50:41 Re: Installing PostgreSQL without using CygWin