pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Glaesemann <grzm@myrealbox.com>
To: Judith Altamirano Figueroa <jaltamirano@correolux.com.mx>
Cc: pgsql-sql@postgresql.org
Subject: Re: query to file
Date: Wed, 19 Oct 2005 09:09:56 +0900
Message-ID: <13FF7F39-FD42-4E4E-8575-2D3D65447413@myrealbox.com> (raw)
In-Reply-To: <1129676639.3523.19.camel@Desarrollo>
References: <1129676639.3523.19.camel@Desarrollo>


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






view thread (4+ messages)  latest in thread

Message-ID: <13FF7F39-FD42-4E4E-8575-2D3D65447413@myrealbox.com>
Permalink:  ../13FF7F39-FD42-4E4E-8575-2D3D65447413@myrealbox.com/
Also on:    postgresql.org/message-id/13FF7F39-FD42-4E4E-8575-2D3D65447413@myrealbox.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: grzm@myrealbox.com, jaltamirano@correolux.com.mx
  Subject: Re: query to file
  In-Reply-To: <13FF7F39-FD42-4E4E-8575-2D3D65447413@myrealbox.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox