pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Huxton <dev@archonet.com>
To: devin@synapticvision.com
Cc: pgsql-sql@postgresql.org
Subject: Re: Sending errors from psql to error file
Date: Thu, 12 Aug 2004 16:00:31 +0100
Message-ID: <411B860F.4020305@archonet.com> (raw)
In-Reply-To: <1092320416.23985.24.camel@192.168.1.80>
References: <1092320416.23985.24.camel@192.168.1.80>

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



view thread (7+ messages)  latest in thread

Message-ID: <411B860F.4020305@archonet.com>
Permalink:  ../411B860F.4020305@archonet.com/
Also on:    postgresql.org/message-id/411B860F.4020305@archonet.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: dev@archonet.com, devin@synapticvision.com
  Subject: Re: Sending errors from psql to error file
  In-Reply-To: <411B860F.4020305@archonet.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox