Search Postgresql Archives

Re: How to Output PSQL Errors to a Log File?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Wang, Mary Y wrote:
Hi,

I used 'pg_dumpall' to dump the database in Postgres 7.1.3 and I'm in the process of restoring the databases in Postgres 8.3.8.  There were lots errors showed on the screen when I ran this command 'psql -e template1 -f 21.bak' and it actually displayed the line numbers where the errors occurred.  Because there were so many errors, and I wanted the errors to be logged to a log file so I ran this command 'psql -e template1 -f 21.bak > late22error.txt', but late22error.txt didn't log the errors, it just logged the transactions.  What option should I use to tell psql to log all errors to a log file?

I'm running on RHEL 3.9.


you need to redirect stderr, see http://www.cyberciti.biz/faq/redirecting-stderr-to-stdout/ for a variety of options





--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux