Re: Column Sizes

Поиск
Список
Период
Сортировка
От Doug McNaught
Тема Re: Column Sizes
Дата
Msg-id 87islpwcgu.fsf@asmodeus.mcnaught.org
обсуждение исходный текст
Ответ на Column Sizes  ("Brett Maton" <brett.maton@itaccounting.co.uk>)
Список pgsql-general
"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

В списке pgsql-general по дате отправления:

Предыдущее
От: Scott Chapman
Дата:
Сообщение: Re: SQL-question: returning the id of an insert querry
Следующее
От: Doug McNaught
Дата:
Сообщение: Re: pl/perl function life and variable scope - concurrency problem?