Re: query to file

From: Michael Glaesemann <grzm(at)myrealbox(dot)com>
To: Judith Altamirano Figueroa <jaltamirano(at)correolux(dot)com(dot)mx>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: query to file
Date: 2005-10-19 00:09:56
Message-ID: 13FF7F39-FD42-4E4E-8575-2D3D65447413@myrealbox.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


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

In response to

  • query to file at 2005-10-18 23:03:59 from Judith Altamirano Figueroa

Browse pgsql-sql by date

  From Date Subject
Next Message Scott Marlowe 2005-10-19 00:30:03 Re:
Previous Message Michael Fuhr 2005-10-19 00:05:13 Re: query to file