Re: run vacuum from within a function

From: Richard Huxton <dev(at)archonet(dot)com>
To: Hugo <htakada(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: run vacuum from within a function
Date: 2005-11-11 08:08:01
Message-ID: 43745161.9050101@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hugo wrote:
> hi everybody,
>
> Is it possible tu run vacuum from a plpgsql function ? I have a process that
> copies a lot of data from a csv file with the copy command and at the end of
> the function I would like to force a vacuun, is that possible.

I'm afraid not. VACUUM can't run inside a transaction block
(BEGIN..COMMIT) which is automatically the context you have if you are
inside a function.

--
Richard Huxton
Archonet Ltd

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jeff Davis 2005-11-11 08:25:32 return next
Previous Message vishal saberwal 2005-11-11 05:10:30 Re: Recuperate each line of a result into a variable ?