reading large objects from DB using ODBC - Mailing list pgsql-interfaces

From Philipp Käser
Subject reading large objects from DB using ODBC
Date
Msg-id 8FBC19E64A26D411B0E3009027F688FB1F030A@indoor.intra.openmind.ch
Whole thread Raw
List pgsql-interfaces
Hello,

I am about to port an application to linux/PostgreSQL; and for convenience
reasons, I would like to use the ODBC interface. I use 
PostgreSQL 7.0.2-2, using the included iodbc interface.

I then created an example database which uses large objects, that went
perfectly smooth (meaning: right the same as I was used to from
the old Windows/MS SQL variant) using the SQLBindParameter directive.
however, reading the large objects seems to be a bit awkward:

all I get when reading from the table is the large-object-ID and its
size.

As for now, I constructed the lo-table-name from the ID (eg. ID=33089,
then table is "xinv33089") and start reading the odata column.
however...
- for files bigger than 8K it's splitted in several rows
- the data "drops" in in chunks of 255 bytes approx
... and this is not really convenient.

Is there any better way to access the large objects? 

I'm grateful for any suggestions, hints, examples, links, docu, whatever.

thanks a lot, bye
Philipp Kaeser
pkaeser@obtree.com


pgsql-interfaces by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [PATCHES] JDBC Patch
Next
From: Anders Bengtsson
Date:
Subject: JDBC getDatabaseProductVersion() patch