Re: How to Output PSQL Errors to a Log File?
От | Nilesh Govindarajan |
---|---|
Тема | Re: How to Output PSQL Errors to a Log File? |
Дата | |
Msg-id | 4B8383F2.2050209@itech7.com обсуждение исходный текст |
Ответ на | How to Output PSQL Errors to a Log File? ("Wang, Mary Y" <mary.y.wang@boeing.com>) |
Список | pgsql-general |
On 02/23/2010 12:54 PM, Nilesh Govindarajan wrote: > On 02/23/2010 12:49 PM, 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. >> >> Thanks >> Mary >> >> >> >> > > psql <...your options...> 2> errorfile.txt > > This is the general shell error redirection. This will work if psql > outputs errors to stderr and not stdout. (Try it out ;)) > -- Nilesh Govindarajan Site & Server Adminstrator www.itech7.com
В списке pgsql-general по дате отправления: