Re: [BUGS] Large Object
От | Peter T Mount |
---|---|
Тема | Re: [BUGS] Large Object |
Дата | |
Msg-id | Pine.LNX.3.95.980428065847.5775A-100000@retep.org.uk обсуждение исходный текст |
Список | pgsql-interfaces |
[ moved to interfaces ] On Tue, 28 Apr 1998, ChulSu Park wrote: > Hello, > > Can anyone answer? > > (1) when I run the test/example/testlo.c, comment out "exit(0)" at the > end of the main, it segfaulted on redhat5.0 linux(and libpq++ examples > also). Then Do I have to call "exit" function always? not usual return > 0; ? > > (2) How can I get the size(length) of the large object? When I try > lo_open > size1 = lo_lseek to SEEK_END > or > size2 = lo_tell > size gives me -1 for big large object(it worked for small large > object). So I browsed the libpq sources, in fe-lobj.c there was comment > something like this > ... only L_SET is implemented... then how can I get the saved large > object size? > impossible? The way I implemented it in the JDBC driver was (similar to): long tmp = lo_seek to SEEK_END long size = lo_tell lo_seek to tmp I tested this on objects ranging from 512 bytes to 2Mb. -- Peter T Mount peter@retep.org.uk or petermount@earthling.net Main Homepage: http://www.demon.co.uk/finder (moving soon to www.retep.org.uk) ************ Someday I may rebuild this signature completely ;-) ************ Work Homepage: http://www.maidstone.gov.uk Work EMail: peter@maidstone.gov.uk
В списке pgsql-interfaces по дате отправления: