X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 1C005DA11F for ; Tue, 18 Oct 2005 21:10:06 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 57803-05 for ; Wed, 19 Oct 2005 00:09:57 +0000 (GMT) Received: from smtp-send.myrealbox.com (smtp-send.myrealbox.com [151.155.5.143]) by svr1.postgresql.org (Postfix) with ESMTP id BD624D9F2F for ; Tue, 18 Oct 2005 21:09:58 -0300 (ADT) Received: from [172.16.1.100] grzm [61.197.227.146] by smtp-send.myrealbox.com with NetMail SMTP Agent $Revision: 1.6 $ on Linux via secured & encrypted transport (TLS); Tue, 18 Oct 2005 18:10:01 -0600 In-Reply-To: <1129676639.3523.19.camel@Desarrollo> References: <1129676639.3523.19.camel@Desarrollo> Mime-Version: 1.0 (Apple Message framework v734) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <13FF7F39-FD42-4E4E-8575-2D3D65447413@myrealbox.com> Cc: pgsql-sql@postgresql.org Content-Transfer-Encoding: 7bit From: Michael Glaesemann Subject: Re: query to file Date: Wed, 19 Oct 2005 09:09:56 +0900 To: Judith Altamirano Figueroa X-Mailer: Apple Mail (2.734) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.014 required=5 tests=[AWL=-0.818, RCVD_IN_BL_SPAMCOP_NET=1.832] X-Spam-Level: * X-Archive-Number: 200510/203 X-Sequence-Number: 23056 On Oct 19, 2005, at 8:03 , Judith Altamirano Figueroa wrote: > Excuse me, how can I send a query to a file?, for example the > result of > this query: > > select id_articulo, articulo, color_code from articulos; You don't mention what client you're using. In psql, you can use \o path/to/file.txt For more psql goodness, take a look at: http://www.postgresql.org/docs/8.0/interactive/app-psql.html Hope this helps! Michael Glaesemann grzm myrealbox com