Re: postgesql-7.3.3 lo_create/lo_open fails

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Colm Dobbs <Colm(dot)Dobbs(at)aepona(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: postgesql-7.3.3 lo_create/lo_open fails
Date: 2003-08-09 15:28:10
Message-ID: 5742.1060442890@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Colm Dobbs <Colm(dot)Dobbs(at)aepona(dot)com> writes:

> Oid lobjId = lo_creat(conn, INV_READ|INV_WRITE);
> if (lobjId != -1)

This coding is wrong --- lo_creat would return 0 (InvalidOid) on
failure, not -1. As for *why* it's failing, PQerrorMessage might
offer some hint. I'm a tad surprised by that myself; never heard
of it happening with a connection not already in an error state.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Christopher Browne 2003-08-09 15:34:56 Re: postmaster(s) have high load average
Previous Message Bruno Wolff III 2003-08-09 15:18:17 Re: PostgreSQL and ACID properties support