Re: Deleting BLOBs

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Neanderthelle Jones <elle(at)view(dot)net(dot)au>
Cc: PGSQL Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Re: Deleting BLOBs
Date: 2012-08-13 00:13:07
Message-ID: 17379.1344816787@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Neanderthelle Jones <elle(at)view(dot)net(dot)au> writes:
> One attempt. Is the error mine or PostgreSQL's?

> $ for i in $(psql -q -t -U elle -d my_db \
> -c "SELECT raster FROM images where raster > 0"); do
> echo $i
> psql -q -U elle -d my_db -c "SELECT lo_unlink($i)"
> done

> 21234
> ERROR: large object 21234 does not exist
> 21235
> ERROR: large object 21235 does not exist
> [etc]

That script looks reasonable enough, if perhaps not too fast. Are you
sure the table actually does reference live large objects?

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Neanderthelle Jones 2012-08-13 00:37:30 Re: Deleting BLOBs
Previous Message Neanderthelle Jones 2012-08-12 23:55:55 Re: Deleting BLOBs