Re: [SQL] deleting large objects from jdbc

From: Grant <grant(at)conprojan(dot)com(dot)au>
To: pgsql-sql(at)postgresql(dot)org
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: [SQL] deleting large objects from jdbc
Date: 2001-08-20 01:52:35
Message-ID: Pine.LNX.4.21.0108201149520.762-100000@webster.conprojan.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-sql

> I've been browsing the newsgroup archives and came across the following:
>
> > > > > > Can you see a scenario where a programmer would forget to
> delete the
> > > > > > data from pg_largeobject and the database becoming very large
> filled
> > > > > > with orphaned large objects?
>
> Does this mean that to delete my large object I need to delete the row
> in my table, and also the row or rows in pg_largeobject. Currently I am
> only deleting the row in my table. I have just been looking at the
> pg_largeobject table, it seems to have more rows than I would expect in
> it. Is the solution to pass these two commands to jdbc?
> delete from my_table where lob_oid = 1234
> delete from pg_largeobject where loid = 1234

Yes or jdbc might have a large object unlink/delete/remove function. I use
PHP and it has a function that will remove the large object for me, but
your solution is just as good imo.

* Another important point to note is that large objects are _not_ backed
up by default.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message raja kumar thatte 2001-08-20 04:26:20 give me suggestion pl.
Previous Message Grant 2001-08-20 00:17:16 Re: DB size

Browse pgsql-sql by date

  From Date Subject
Next Message Christopher Sawtell 2001-08-20 04:02:36 Re: Array in plpgsql
Previous Message Jayson Callaway 2001-08-20 00:40:17 SQL Statement too long