Re: Reg:lo_open error..pls help me

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

"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.

You might want to look at src/test/examples/testlo.c in the PG distribution.

regards, tom lane

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Michael Fuhr 2006-03-01 16:10:59 Re: Reg:lo_open error..pls help me
Previous Message Michael Fuhr 2006-03-01 15:26:20 Re: Reg:lo_open error..pls help me

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Fuhr 2006-03-01 16:10:59 Re: Reg:lo_open error..pls help me
Previous Message Simon Riggs 2006-03-01 15:48:05 statement_cost_limit