[DB-SIG] mxODBC and large objects (BLOBS)

M.-A. Lemburg mal@lemburg.com
Thu, 11 May 2000 21:47:45 +0200


"James L. Preston" wrote:
> 
> I am trying  few different methods of working with a kind of document
> management system
> under PostgreSQL on Solaris.
> I have had some success with PygreSQL, but I thought that I would try to
> use mxODBC, since this
> is supposed to conform the 2.0-api, etc. I got the unixODBC driver and
> some things seem to work OK,
> but I can't figure out how to handle large objects (BLOBS) . Are these
> not supported by mxODBC,
> or not by the ODBC drivers for PostgreSQL, or am I missing something? At
> this point,
> I think that I will go back to PygreSQL, which has a "large object"
> python type that wraps around
> the lo_export kind of  postgreSQL functions, which is very helpful, but
> I would like to get a better idea
> of what is going on with the ODBC stuff.

There's really no magic to it: you simply pass the BLOB
as normal Python string to the .execute() method and ODBC
does the rest for you.

Output is a string too, BTW.

-- 
Marc-Andre Lemburg
______________________________________________________________________
Business:                                      http://www.lemburg.com/
Python Pages:                           http://www.lemburg.com/python/