pqlib large object error
Edward Amsden <[email protected]>
| Newsgroups | gmane.comp.db.postgresql.interfaces |
|---|---|
| Message-ID | <1213118594.9123.11.camel@dad-desktop2> |
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
--
Sent via pgsql-interfaces mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-interfaces