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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-novice by date

  From Date Subject
Next Message Joel Burton 2000-12-21 19:42:58 Re: Transactions
Previous Message Tom Lane 2000-12-21 16:48:22 Re: plpgsql language not recognized