From: Tom Lane <tgl@sss.pgh.pa.us>
To: Edward Amsden <amsden_linux@embarqmail.com>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: pqlib large object error
Date: Tue, 10 Jun 2008 17:06:23 -0400
Message-ID: <24672.1213131983@sss.pgh.pa.us> (raw)
In-Reply-To: <1213118594.9123.11.camel@dad-desktop2>
References: <1213118594.9123.11.camel@dad-desktop2>
Edward Amsden <amsden_linux@embarqmail.com> writes:
> I am using the following code to create the large object:
> lo_1 = lo_creat(connect1, INV_READ|INV_WRITE);
> if (lo_1 > 0) {
> ... (open and write)
> } else {
> fprintf (stderr, "Unable to create large object: %s\n", PQerrorMessage(connect1));
> }
BTW, what type do you have lo_1 declared as? It strikes me that if it's
signed int32, and your OID counter is past 2 billion, this code would
fail because it would misinterpret a valid OID as negative. The printf
would then report whatever the last error on the connection had been.
This still wouldn't explain why you're getting the duplicate-key error,
but it might at least point to the proper place to look.
regards, tom lane
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: tgl@sss.pgh.pa.us, amsden_linux@embarqmail.com
Subject: Re: pqlib large object error
In-Reply-To: <24672.1213131983@sss.pgh.pa.us>
* 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