Deleting BLOBs

From: Neanderthelle Jones <elle(at)view(dot)net(dot)au>
To: PGSQL Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Deleting BLOBs
Date: 2012-08-12 10:16:59
Message-ID: Pine.LNX.4.64.1208121919470.29266@calypso.view.net.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'd like to delete all the image files from a table by issuing an
interactive psql command. Given

CREATE TABLE image (
name text,
rast oid
);

with most tuples having images in rast, wanna do something like

=> select lo_unlink('select rast from image');

Can such a thing be done, and how? I guess I've forgotten the syntax.

Or will an update that sets the oids to null or 0 work?

(pgsql 9.1.2)

Thanks.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andreas Kretschmer 2012-08-12 10:44:36 Re: Deleting BLOBs
Previous Message Andrus 2012-08-12 10:02:17 Re: How to raise error from PostgreSql SQL statement if some condition is met