pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Fuhr <mike@fuhr.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: sandhya <sandhyar@amiindia.co.in>
Cc: Postgres <pgsql-admin@postgresql.org>
Subject: Re: Reg:lo_open error..pls help me
Date: Wed, 1 Mar 2006 09:10:59 -0700
Message-ID: <20060301161059.GA80123@winnie.fuhr.org> (raw)
In-Reply-To: <11079.1141228992@sss.pgh.pa.us>
References: <018201c63d27$34f26ec0$cd00000a@sandhyar>
	<01b701c63d2a$4d640880$cd00000a@sandhyar>
	<11079.1141228992@sss.pgh.pa.us>

On Wed, Mar 01, 2006 at 11:03:12AM -0500, Tom Lane wrote:
> "sandhya" <sandhyar@amiindia.co.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



view thread (5+ messages)  latest in thread

Message-ID: <20060301161059.GA80123@winnie.fuhr.org>
Permalink:  ../20060301161059.GA80123@winnie.fuhr.org/
Also on:    postgresql.org/message-id/20060301161059.GA80123@winnie.fuhr.org

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: mike@fuhr.org, tgl@sss.pgh.pa.us, sandhyar@amiindia.co.in
  Subject: Re: Reg:lo_open error..pls help me
  In-Reply-To: <20060301161059.GA80123@winnie.fuhr.org>
  References: <018201c63d27$34f26ec0$cd00000a@sandhyar> <01b701c63d2a$4d640880$cd00000a@sandhyar> <11079.1141228992@sss.pgh.pa.us> <20060301161059.GA80123@winnie.fuhr.org>

* 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