pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Edward Amsden <amsden_linux@embarqmail.com>
To: pgsql-interfaces@postgresql.org
Subject: pqlib large object error
Date: Tue, 10 Jun 2008 13:23:14 -0400
Message-ID: <1213118594.9123.11.camel@dad-desktop2> (raw)

I am writing some proof-of-concept code for a project which involves
using PostgreSQL's large object facility to store audio data. Currently,
the goal for this code is to test the performance of reading audio data
from a file and writing it to a large object. I am learning as I go, but
I cannot seem to figure this error message out:

ERROR:  duplicate key value violates unique constraint "pg_largeobject_loid_pn_index"

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));
		}

where connect1 is the pointer to my connection. Why is there a duplicate key if lo_creat() is supposed to assign an unused OID?

Thanks,
Edward




view thread (13+ messages)  latest in thread

Message-ID: <1213118594.9123.11.camel@dad-desktop2>
Permalink:  ../1213118594.9123.11.camel@dad-desktop2/
Also on:    postgresql.org/message-id/1213118594.9123.11.camel@dad-desktop2

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: amsden_linux@embarqmail.com
  Subject: Re: pqlib large object error
  In-Reply-To: <1213118594.9123.11.camel@dad-desktop2>

* 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