From: | James Leigh <james(dot)leigh(at)ottawa(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | lo_open problems |
Date: | 2002-03-04 21:42:24 |
Message-ID: | 1015278145.14587.13.camel@jacob |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I am using some large object, but lo_open always returns -1. I don't
know why.
Here is a code snipet (compiled with g++ for C++).
/*
* create the large object
*/
Oid lobjId = lo_creat(conn, INV_READ | INV_WRITE);// works
if (lobjId == 0){
fprintf(stderr, "can't create large object\n");
return 0;
}
int lobj_fd = lo_open(conn, lobjId, INV_WRITE);// == -1
if(lobj_fd < 0){
fprintf(stderr, "can't open large object (%d)\n", lobjId);
return 0;
}
lo_creat works and I can use psql with '\dl' to see the new lo created,
but lo_open returns '-1'. In what cases would lo_open fail after a
successfull lo_creat?
Running the provided sample program works, so lo support is there, but
in my large application I cannot open the lo.
any ideas?
james
From | Date | Subject | |
---|---|---|---|
Next Message | Krog, Kenneth | 2002-03-04 21:44:50 | Validating Whole Numbers |
Previous Message | Hunter Hillegas | 2002-03-04 21:41:26 | Changes to NOW() in 7.2? |