Re: vacuumdb for schema only
От | Bèrto ëd Sèra |
---|---|
Тема | Re: vacuumdb for schema only |
Дата | |
Msg-id | AANLkTikCASOTQbcw1RG7x_dp5txZ=hOwz3HeJfR2G4BT@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: vacuumdb for schema only (Fabrízio de Royes Mello <fabriziomello@gmail.com>) |
Список | pgsql-admin |
Nice to know that, which means we can only send out scripts by cron...
--
==============================
Constitution du 24 juin 1793 - Article 35. - Quand le gouvernement viole les droits du peuple, l'insurrection est, pour le peuple et pour chaque portion du peuple, le plus sacré des droits et le plus indispensable des devoirs.
On 8 September 2010 16:06, Fabrízio de Royes Mello <fabriziomello@gmail.com> wrote:
2010/9/8 Bèrto ëd Sèra <berto.d.sera@gmail.com>Hi!I would also expect you to be able to make a Stored Procedure executing the same command, although I never tried it myself.It is not possible... vacuum cannot be executed inside a function or transaction.See de sample:-- Using functionCREATE OR REPLACE FUNCTION fc_vacuum(TEXT) RETURNS VOID AS$$BEGINEXECUTE 'VACUUM '||$1;RETURN;END;$$LANGUAGE plpgsql;postgres@bdteste=# select fc_vacuum('foo');ERROR: VACUUM cannot be executed from a functionCONTEXT: SQL statement "VACUUM foo"PL/pgSQL function "fc_vacuum" line 2 at execute statement-- Using transactionpostgres@bdteste=# begin;BEGINpostgres@bdteste=# VACUUM foo;ERROR: VACUUM cannot run inside a transaction blockBest regards,
--
Fabrízio de Royes Mello
>> Blog sobre TI: http://fabriziomello.blogspot.com>> Perfil Linkedin: http://br.linkedin.com/in/fabriziomello
--
==============================
Constitution du 24 juin 1793 - Article 35. - Quand le gouvernement viole les droits du peuple, l'insurrection est, pour le peuple et pour chaque portion du peuple, le plus sacré des droits et le plus indispensable des devoirs.
В списке pgsql-admin по дате отправления: