[GENERAL] Large Objects: Sizeof and Deleting Unlinked LOs

2010-02-10 Thread Howard Cole
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_onl

Re: [GENERAL] Large Objects: Sizeof and Deleting Unlinked LOs

2010-02-11 Thread Harald Fuchs
In article <4b72aeb3.4000...@selestial.com>, Howard Cole writes: > Is there an SQL function to determine the size of a large object? I'm using a pgsql helper function for that: CREATE FUNCTION lo_size(oid oid) RETURNS integer LANGUAGE plpgsql AS $$ DECLARE fd int; res i