Large Objects: Sizeof and Deleting Unlinked LOs

From: Howard Cole <howardnews(at)selestial(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Large Objects: Sizeof and Deleting Unlinked LOs
Date: 2010-02-10 13:03:47
Message-ID: 4B72AEB3.4000809@selestial.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Is there an SQL function to determine the size of a large object?

Also, can I safely delete all the large objects in
pg_catalog.pg_largeobject? For example:

select lo_unlink(loid) from (select distinct loid from
pg_catalog.pg_largeobject) as loids where loid not in (select my_oid
from my_only_table_that_uses_large_objects)

Or are there other things stored in there that I don't know about!

Thanks.

Howard Cole
www.selestial.com

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Frank Joerdens 2010-02-10 13:46:18 Re: Locking referenced table when creating and dropping tables with foreign key constraints (SOLVED)
Previous Message Thom Brown 2010-02-10 12:44:35 Re: PHP and PostgreSQL boolean data type