Re: Select dump - Mailing list pgsql-novice

From Geoffrey
Subject Re: Select dump
Date
Msg-id 42820FB3.7070408@3times25.net
Whole thread Raw
In response to Select dump  (SG Edwards <s0460205@sms.ed.ac.uk>)
List pgsql-novice
SG Edwards wrote:
> Hi,
>
> Quick question for 10 points!
>
> Is there a way to write the output of a select query to a file (I'm on a linux
> platform)?
>
> For example:
>
> SELECT name, age, address from employee;
>
> gives the result that I want to write to a text file:

 From what interface?  You can do this from psql:

echo 'select foo from bar;' | psql database > select.out

--
Until later, Geoffrey

pgsql-novice by date:

Previous
From: "Van Ingen, Lane"
Date:
Subject: First plpgsql Script
Next
From: Tom Lane
Date:
Subject: Re: First plpgsql Script