Re: Sending errors from psql to error file - Mailing list pgsql-sql

From Richard Huxton
Subject Re: Sending errors from psql to error file
Date
Msg-id 411B860F.4020305@archonet.com
Whole thread Raw
In response to Sending errors from psql to error file  (Devin Whalen <devin@synapticvision.com>)
List pgsql-sql
Devin Whalen wrote:
> I don't want to have to sit there and watch the import go by, I want to
> run a command and then look in a file for any errors after the import is
> complete.  I tried this command but it didn't work:
> gunzip -c cli_postDataInserts.sql.gz | psql cli_post -U system | grep
> "ERROR:*" > import_errors

Try something like: ... psql cli_post 2>import_errors

STDOUT is file-handle 1, STDERR is file-handle 2. You might also want to 
read up on the "tee" utility.

--   Richard Huxton  Archonet Ltd


pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: function expression in FROM may not refer to other relations of same query level
Next
From: Devin Whalen
Date:
Subject: Re: Sending errors from psql to error file