Custom vacuum

Custom vacuum

am 20.07.2010 20:34:50 von gibon

This is a multi-part message in MIME format.

------=_NextPart_000_003B_01CB2821.175EC630
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

I want perform VACUUM on specific tables. This tables are result of =
query in my database (select tablename from mytablesvacuum). I tryed use =
a cursor=20
on function, but i receive message that vacuun can't run in function.=20

Any idea to do this?

tks
F=E1bio Henrique Gibon
Comex System Consultoria
------=_NextPart_000_003B_01CB2821.175EC630
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable



charset=3Dwindows-1252"> href=3D"file://C:\Arquivos de programas\Arquivos comuns\Microsoft =
Shared\Papel de carta\">




I want perform VACUUM on specific tables. This tables are result of =
query=20
in my database (select tablename from mytablesvacuum). I tryed use a =
cursor=20

on function, but i receive message that vacuun can't run in =
function.

 

Any idea to do this?

 

tks
F=E1bio Henrique Gibon
Comex System =
Consultoria


------=_NextPart_000_003B_01CB2821.175EC630--

Re: Custom vacuum

am 21.07.2010 14:16:51 von fabriziomello

--0016e6434ae0d9728f048be4c657
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

2010/7/20 F=E1bio Gibon - Comex System

> I want perform VACUUM on specific tables. This tables are result of quer=
y
> in my database (select tablename from mytablesvacuum). I tryed use a curs=
or
> on function, but i receive message that vacuun can't run in function.
>
> Any idea to do this?
>
>

Try this:

psql -U postgres -A -t your_database_name -c "SELECT 'VACUUM
'||tablename||';' FROM mytablesvacuum" | psql -U postgres your_database_nam=
e


Best regards,
--=20
Fabr=EDzio de Royes Mello
>> Blog sobre TI: http://fabriziomello.blogspot.com

--0016e6434ae0d9728f048be4c657
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable


2010/7/20 F=E1bio Gibon - Comex System dir=3D"ltr"><gibon@comexsys=
tem.com.br
>
gin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">







I want perform VACUUM on specific tables. This tables are result of qu=
ery=20
in my database (select tablename from mytablesvacuum). I tryed use a cursor=
=20

on function, but i receive message that vacuun can't run in functio=
n.

=A0

Any idea to do this?

=A0

Try this:

iv>
ospace">psql -U postgres -A -t your_database_name -c "SELECT 'VACU=
UM '||tablename||';' FROM mytablesvacuum" | psql -U postgr=
es your_database_name



Best regards,
--
Fabr=EDzio de Royes Me=
llo
>> Blog sobre TI: ">http://fabriziomello.blogspot.com



--0016e6434ae0d9728f048be4c657--