From gibon@comexsystem.com.br Tue Jul 20 18:35:09 2010 Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 43244637CEF for ; Tue, 20 Jul 2010 15:35:09 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 29192-04-2 for ; Tue, 20 Jul 2010 18:35:02 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from ns3a.twi.com.br (ns3a.twi.com.br [201.87.225.53]) by mail.postgresql.org (Postfix) with ESMTP id 8C2CC637CE9 for ; Tue, 20 Jul 2010 15:35:01 -0300 (ADT) Received: (qmail 72602 invoked from network); 20 Jul 2010 15:34:56 -0300 Received: from unknown (HELO gibon) (gibon@comexsystem.com.br@[187.36.54.37]) (envelope-sender ) by ns3a.twi.com.br (qmail-ldap-1.03) with SMTP for ; 20 Jul 2010 15:34:56 -0300 Message-ID: <003e01cb283a$3fa1e5a0$6500a8c0@gibon> Reply-To: =?Windows-1252?Q?F=E1bio_Gibon_-_Comex_System?= From: =?Windows-1252?Q?F=E1bio_Gibon_-_Comex_System?= To: "PostgreSQL - mailing list" Subject: Custom vacuum Date: Tue, 20 Jul 2010 15:34:50 -0300 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_003B_01CB2821.175EC630" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.3138 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.801 tagged_above=-10 required=5 tests=BAYES_50=0.8, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 201007/148 X-Sequence-Number: 35167 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
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-- From fabriziomello@gmail.com Wed Jul 21 12:17:00 2010 Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id A9CA163282E for ; Wed, 21 Jul 2010 09:17:00 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 15502-05 for ; Wed, 21 Jul 2010 12:16:52 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-vw0-f46.google.com (mail-vw0-f46.google.com [209.85.212.46]) by mail.postgresql.org (Postfix) with ESMTP id 98B90632FA1 for ; Wed, 21 Jul 2010 09:16:53 -0300 (ADT) Received: by vws14 with SMTP id 14so1546273vws.19 for ; Wed, 21 Jul 2010 05:16:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:reply-to :in-reply-to:references:date:message-id:subject:from:to:cc :content-type; bh=3haqokRjKywB/20B2sDiVmXTDNull6ah9c45gcbwX+Y=; b=gVCnMEmk14FvNamJt8Uyt76SbI9q9SsbHYOCZVm4CBXOD0OFJo/L4tyU9pPqkEZzFz G+fuvYZZdLfQnlQk3w4CzwcrkgcUidruVXrFkEUCAYPhxMxiY4cX3y+T+IzmrJ75nbxg i+fXSZtC3vejx5eSNdMyrBUp2bAbtkt8vxHuI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; b=HjUme6Jybns76qPqGTgjmDbo9nOzzuAnguwJZYaTe9pcLASUMMJiwxzkWHeaBA3Qs9 K6zXNZ/zLO9gt+TWM32gwxpoAhJ28bOwTRdMszNHr+ucxF1YSh9Jcp/EpRG5hxhtQ0pY IfM398U44/S+rblWmw3Lz12rNep6Yba5qiEe8= MIME-Version: 1.0 Received: by 10.220.49.28 with SMTP id t28mr4221298vcf.233.1279714611786; Wed, 21 Jul 2010 05:16:51 -0700 (PDT) Received: by 10.229.48.202 with HTTP; Wed, 21 Jul 2010 05:16:51 -0700 (PDT) Reply-To: fabriziomello@gmail.com In-Reply-To: <003e01cb283a$3fa1e5a0$6500a8c0@gibon> References: <003e01cb283a$3fa1e5a0$6500a8c0@gibon> Date: Wed, 21 Jul 2010 09:16:51 -0300 Message-ID: Subject: Re: Custom vacuum From: =?ISO-8859-1?Q?Fabr=EDzio_de_Royes_Mello?= To: =?ISO-8859-1?Q?F=E1bio_Gibon_=2D_Comex_System?= Cc: PostgreSQL - mailing list Content-Type: multipart/alternative; boundary=0016e6434ae0d9728f048be4c657 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.981 tagged_above=-10 required=5 tests=BAYES_20=-0.001, HTML_FONT_FACE_BAD=0.981, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201007/153 X-Sequence-Number: 35172 --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 <gibon@comexsys= tem.com.br>
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:

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--