Re: Capturing all output from psql into a file - Mailing list pgsql-novice

From David Merrill
Subject Re: Capturing all output from psql into a file
Date
Msg-id 20001221123103.A13038@lupercalia.net
Whole thread Raw
In response to RE: Capturing all output from psql into a file  ("Tamsin" <tamsin@bryncadfan.co.uk>)
List pgsql-novice
On Wed, Dec 20, 2000 at 09:07:50AM -0000, Tamsin wrote:
> I use this:
>
> psql dbname -c "\i sqlscript.txt" &> file.txt
>
> (enter at shell prompt rather than going into psql first)

I am doing this also, from a shell script. I redirect the messages
into error.log, then the last line of my script is:

grep < error.log ERROR

which displays any errors that may have happened. This is how I deal
with the volume of NOTICE lines that I get, which would otherwise
obscure the ERROR lines.

--
Dr. David C. Merrill                     http://www.lupercalia.net
Linux Documentation Project                dmerrill@lupercalia.net
Collection Editor & Coordinator            http://www.linuxdoc.org
                                       Finger me for my public key

We all come from the Goddess
And to Her we shall return
Like a drop of rain
Flowing to the ocean

pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: plpgsql language not recognized
Next
From: Joel Burton
Date:
Subject: Re: Transactions