标签: sql postgresql psql
我已经在psql-shell中尝试过使用\ o和\ o打开和关闭标记的脚本,但它只记录结果。我正在寻找错误。 需要记录我们查询的所有结果,包括PSQL-shell中的错误。
答案 0 :(得分:0)
如果在Linux中:
psql -f my_script.sql --echo-errors --echo-queries &> output.log
http://www.postgresql.org/docs/current/static/app-psql.html