From: Michael Fuhr <mike@fuhr.org>
To: sandhya <sandhyar@amiindia.co.in>
Cc: Postgres <pgsql-admin@postgresql.org>
Subject: Re: large object unlinking
Date: Thu, 23 Feb 2006 08:28:38 -0700
Message-ID: <20060223152838.GA36720@winnie.fuhr.org> (raw)
In-Reply-To: <00ce01c6384e$68e3c540$cd00000a@sandhyar>
References: <00ce01c6384e$68e3c540$cd00000a@sandhyar>
On Thu, Feb 23, 2006 at 01:24:43PM +0530, sandhya wrote:
> Is there any possibility to delete /Unlink a group of large objects at a time?
> Please tell me .To test my application i have loaded somany files into database.
> Now i want to unlink all those objects.
You could call lo_unlink() in a query. Example:
SELECT lo_unlink(loid) FROM (SELECT DISTINCT loid FROM foo) AS s;
See also contrib/vacuumlo, which will automatically remove large
objects that aren't referenced anywhere.
--
Michael Fuhr
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: mike@fuhr.org, sandhyar@amiindia.co.in
Subject: Re: large object unlinking
In-Reply-To: <20060223152838.GA36720@winnie.fuhr.org>
References: <00ce01c6384e$68e3c540$cd00000a@sandhyar> <20060223152838.GA36720@winnie.fuhr.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox