Re: Custom vacuum

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




2010/7/20 Fábio Gibon - Comex System <gibon@xxxxxxxxxxxxxxxxxx>
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
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_name


Best regards,
--
Fabrízio de Royes Mello
>> Blog sobre TI: http://fabriziomello.blogspot.com

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux