Re: Redirecting query's output to a textfile?

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Peter Peltonen <peter(dot)peltonen(at)fivetec(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Redirecting query's output to a textfile?
Date: 2002-02-15 16:59:25
Message-ID: 20020215165925.GA2025@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Feb 15, 2002 at 06:11:08PM +0200,
Peter Peltonen <peter(dot)peltonen(at)fivetec(dot)com> wrote:
>
> A basic question:
>
> How in PostgreSQL do I redirect the output of an SQL query to a textfile?

Assuming you are talking about doing this in psql, the answer is to use:
\o filename
\? will provide help on the other psql \ commands.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Doug McNaught 2002-02-15 17:05:59 Re: Any troubleshooting techniques
Previous Message Johnson, Shaunn 2002-02-15 16:46:21 Any troubleshooting techniques