Re: Reg:lo_open error..pls help me

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: sandhya <sandhyar(at)amiindia(dot)co(dot)in>, Postgres <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Reg:lo_open error..pls help me
Date: 2006-03-01 16:10:59
Message-ID: 20060301161059.GA80123@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-hackers

On Wed, Mar 01, 2006 at 11:03:12AM -0500, Tom Lane wrote:
> "sandhya" <sandhyar(at)amiindia(dot)co(dot)in> writes:
> > But lo_open is returning -1(-ve value).
>
> Are you sure that's where it's failing? The fragment you showed looks
> fine as far as it goes. The most likely bet is you forgot to wrap it in
> a transaction (BEGIN/COMMIT commands), but that would result in a
> failure at the seek/write commands because the object wouldn't be open
> anymore.

lo_open() fails if it's not in a transaction. The error from
PQerrorMessage is:

ERROR: invalid large-object descriptor: 0

--
Michael Fuhr

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2006-03-01 16:30:10 Re: [ADMIN] Reg:lo_open error..pls help me
Previous Message Tom Lane 2006-03-01 16:03:12 Re: Reg:lo_open error..pls help me

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2006-03-01 16:16:16 Re: Automatic free space map filling
Previous Message Tom Lane 2006-03-01 16:03:12 Re: Reg:lo_open error..pls help me