Skip site navigation (1) Skip section navigation (2)

Re: Capturing all output from psql into a file

From: David Merrill <dmerrill(at)lupercalia(dot)net>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Capturing all output from psql into a file
Date: 2000-12-21 17:31:03
Message-ID: 20001221123103.A13038@lupercalia.net (view raw or flat)
Thread:
Lists: 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(at)lupercalia(dot)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

In response to

pgsql-novice by date

Next:From: Joel BurtonDate: 2000-12-21 19:42:58
Subject: Re: Transactions
Previous:From: Tom LaneDate: 2000-12-21 16:48:22
Subject: Re: plpgsql language not recognized

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group