Re: query to file - Mailing list pgsql-sql

From Michael Glaesemann
Subject Re: query to file
Date
Msg-id 13FF7F39-FD42-4E4E-8575-2D3D65447413@myrealbox.com
Whole thread Raw
In response to query to file  (Judith Altamirano Figueroa <jaltamirano@correolux.com.mx>)
List 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





pgsql-sql by date:

Previous
From: Judith Altamirano Figueroa
Date:
Subject: query to file
Next
From: Michael Fuhr
Date:
Subject: Re: query to file