Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces

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

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.
- 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

pgsql-interfaces by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group