Re: Sending errors from psql to error file

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Sending errors from psql to error file
Дата
Msg-id 411B860F.4020305@archonet.com
обсуждение исходный текст
Ответ на Sending errors from psql to error file  (Devin Whalen <devin@synapticvision.com>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: function expression in FROM may not refer to other relations of same query level
Следующее
От: Devin Whalen
Дата:
Сообщение: Re: Sending errors from psql to error file