On Tue, 18 Aug 2009 13:56:02 -0700 (PDT)
Andrew Klaassen <[email protected]> wrote:
> This may be a stupid question, but I'm stumped so far:  How do I create and 
> access large objects (i.e. lo_creat, lo_open, etc) via pgdb?

Large object handling is a bit murky in PyGreSQL.  This is mostly due
to the fact that there isn't really much need for it any more.  At one
time there were system limits on the size of a field in a record but
now you are only limited by disk space.  Have you considered just
putting the large object right into a field in a table?  Just don't
expect to be able to do "SELECT *..." on that table.  :-)

You should also consider the possibility that storing in the database
may not be your best option anyway.  I wound up moving stored files
outside the database because it made for a better backup strategy but
that's a design consideration.

If you still want to go with large objects then create a large object
with db.locreate(mode) and look at the attributes with dir().  You will
see familiar methods such as read, write, open, close, etc.  See the
docs at http://PyGreSQL.org/pg.html for a basic explanation of the
locreate() method.

-- 
D'Arcy J.M. Cain
PyGreSQL Development Group
http://www.PyGreSQL.org
_______________________________________________
PyGreSQL mailing list
[email protected]
http://mailman.vex.net/mailman/listinfo/pygresql

Reply via email to