How we can get all the PostgreSQL output(including the error) to a log file?
<p>I have already tried in psql-shell  the script with \o and \o opening and closing tags,but it only logging the result. am looking for the errors also.
Need to log all the result of our query including errors in PSQL-shell.</p>