"Brett Maton" <brett.maton@itaccounting.co.uk> writes:
> Hi NG,
>
> How do I find out the size of a column ?
>
> I am retrieving large objects from the pg_largeobject table and creating a
> files, I would like to know the length of the data column so that I can
> implement buffering instead of writing hundreds of small chunks to disk.
Funny, there doesn't seem to be an lo_size() function--I was sure
there was one. I'm not sure if there's a way to find out the size of
a large object without reading it all.
If you just do lo_read() in a loop with a reasonably large buffer it
should be fairly efficient.
-Doug