reading large objects from DB using ODBC

From: Philipp Käser <pkaeser(at)obtree(dot)com>
To: "'pgsql-interfaces(at)postgresql(dot)org'" <pgsql-interfaces(at)postgresql(dot)org>
Subject: reading large objects from DB using ODBC
Date: 2000-09-13 17:23:11
Message-ID: 8FBC19E64A26D411B0E3009027F688FB1F030A@indoor.intra.openmind.ch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)obtree(dot)com

Browse pgsql-interfaces by date

  From Date Subject
Next Message Anders Bengtsson 2000-09-13 19:28:14 JDBC getDatabaseProductVersion() patch
Previous Message Bruce Momjian 2000-09-12 14:10:48 Re: [PATCHES] JDBC Patch