Re: Column Sizes

Поиск
Список
Период
Сортировка
От Adam Ruth
Тема Re: Column Sizes
Дата
Msg-id 820AE32D-154D-11D8-94C7-000A959D1424@intercation.com
обсуждение исходный текст
Ответ на Column Sizes  ("Brett Maton" <brett.maton@itaccounting.co.uk>)
Список pgsql-general
On Nov 12, 2003, at 11:04 AM, Brett Maton wrote:

> 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.
>
> Any help would be appreciated.
>
> Thanks in advance,
>
>  Brett
>
>

I always check for the size this way:

select sum(length(data)) from pg_largeobject where loid = xxx;

Or if you want to know the size of an individual page:

select pageno, length(data) from pg_largeobject where loid = xxx order
by pageno;

Hope this help,

Adam Ruth


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

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: using NOLOCK cause Cartesian joins
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: SQL-question: returning the id of an insert querry