From: | "Jason Jones" <jason(dot)jones(at)awl(dot)com> |
---|---|
To: | <pgsql-interfaces(at)postgresql(dot)org> |
Subject: | help with pygresql and large objects |
Date: | 1999-11-05 18:57:51 |
Message-ID: | 008401bf27bf$a93b0f00f8080a@awl.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-interfaces |
I'm new to postgresql and using PyGreSQL 2.4 I'm experiencing problems with
large objects. I can create them and destroy them, but can't open them to
read or write. Here is some sample code from the interactive prompt:
>>> import pg
>>> db=pg.connect(blah...)
>>> bigobj = db.locreate(pg.INV_READ|pg.INV_WRITE)
>>> bigobj.oid
18369
>>> bigobj.open(pg.INV_READ|pg.INV_WRITE)
Traceback (innermost last):
File "<stdin>", line 1, in ?
IOError: can't open large object.
>>> bigobj.error
'ERROR: lo_lseek: invalid large obj descriptor (0)\012'
>>>
I've tried single constants too, instead of OR'ing them, but nothing seems
to work. I always get the lo_lseek error. I'm probably just doing something
wrong, but I don't know what.
Any ideas?
Thanks,
Jason Jones
jonesj(at)awl(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Jason Jones | 1999-11-05 20:50:34 | help with PyGreSQL and large objects |
Previous Message | Thomas Lockhart | 1999-11-04 16:51:30 | Re: [INTERFACES] ODBC connect from Linux to Postgresql db server |