pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jason Jones <jason.jones@awl.com>
To: pgsql-interfaces@postgresql.org
Subject: help with PyGreSQL and large objects
Date: Fri, 5 Nov 1999 14:50:34 -0600
Message-ID: <00ba01bf27cf$67c39e10$73f8080a@awl.com> (raw)

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@awl.com






view thread (3+ messages)  latest in thread

Message-ID: <00ba01bf27cf$67c39e10$73f8080a@awl.com>
Permalink:  ../00ba01bf27cf$67c39e10$73f8080a@awl.com/
Also on:    postgresql.org/message-id/00ba01bf27cf$67c39e10$73f8080a@awl.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: jason.jones@awl.com
  Subject: Re: help with PyGreSQL and large objects
  In-Reply-To: <00ba01bf27cf$67c39e10$73f8080a@awl.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox