From: | "sandhya" <sandhyar(at)amiindia(dot)co(dot)in> |
---|---|
To: | "Postgres" <pgsql-admin(at)postgresql(dot)org> |
Subject: | Fw: pls help me |
Date: | 2006-03-01 11:56:38 |
Message-ID: | 018201c63d27$34f26ec0$cd00000a@sandhyar |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin pgsql-hackers |
Hi,
In my application i need to create a file dynamically and load it into DB.
So.....I have created one object at run time .....and trying to open it inorder to write the content into it.....
But lo_open is returning -1(-ve value).
where i am doing mistake pls tell me.
lobjId = lo_creat(conn, INV_READ | INV_WRITE);
if (lobjId == 0)
fprintf(stderr, "can't create large object\n");
lobj_fd = lo_open(conn, lobjId, INV_WRITE);
//My application failed at this point..what i am missing here ?
if (lobj_fd < 0)
{
fprintf(stderr, "can't open large object %d\n",lobjId);
}
lo_lseek(conn, lobj_fd, 0, SEEK_SET);
nwritten = 0;
len = strlen(szContent);
while (len - nwritten > 0)
{
nbytes = lo_write(conn, lobj_fd, szContent, len - nwritten);
nwritten += nbytes;
}
From | Date | Subject | |
---|---|---|---|
Next Message | sandhya | 2006-03-01 12:18:51 | Reg:lo_open error..pls help me |
Previous Message | sandhya | 2006-03-01 10:26:24 | pls help me |
From | Date | Subject | |
---|---|---|---|
Next Message | PFC | 2006-03-01 11:58:21 | Re: wal sync method |
Previous Message | Peter Eisentraut | 2006-03-01 11:49:13 | Re: ipcclean in 8.1 broken? |