[ moved to interfaces ]
On Tue, 28 Apr 1998, ChulSu Park wrote:
> 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
> size1 = lo_lseek to SEEK_END
> 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?
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(at)retep(dot)org(dot)uk or petermount(at)earthling(dot)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(at)maidstone(dot)gov(dot)uk
pgsql-interfaces by date
|Next:||From: Stephen Davies||Date: 1998-04-28 07:06:01|
|Subject: Re: [INTERFACES] New Driver |
|Previous:||From: Peter T Mount||Date: 1998-04-28 05:36:51|
|Subject: Re: [HACKERS] Re: [INTERFACES] retrieving varchar size|