Re: computing and updating the size of a table with large objects

From: "Marco Bizzarri" <marco(dot)bizzarri(at)gmail(dot)com>
To: "Daniel Verite" <daniel(at)manitou-mail(dot)org>
Cc: PgSQL-General <pgsql-general(at)postgresql(dot)org>
Subject: Re: computing and updating the size of a table with large objects
Date: 2007-09-01 05:58:46
Message-ID: 3f0d61c40708312258m3ca95dacmcd4704fcdc45b07d@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 8/31/07, Daniel Verite <daniel(at)manitou-mail(dot)org> wrote:
>
> You can get the sizes from pg_largeobject, this way:
>
> SELECT id_doc, sum(length(data)) as filesize
> FROM documenti, pg_largeobject
> WHERE documenti.file = pg_largeobject.loid
> GROUP BY id_doc;
>
> --
> Daniel
> PostgreSQL-powered mail user agent and storage: http://www.manitou-mail.org
>

Thanks a lot for the suggestion: I didn't think to use the
pg_largeobject: much cleaner, now :-)

Regards
Marco
--
Marco Bizzarri
http://iliveinpisa.blogspot.com/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ashish Karalkar 2007-09-01 07:16:24 Export data to MS Excel
Previous Message Tom Lane 2007-09-01 02:14:06 Re: Out of Memory - 8.2.4