Emi*_*zer 4 postgresql psql errors
我正在输入类似的内容:
psql --single-transaction --quiet my_db < my_file.sql
Run Code Online (Sandbox Code Playgroud)
当脚本失败时,我收到很多行说:current transaction is aborted, commands ignored until end of transaction block.
在 linux 中我可以使用| more管道传输结果,但在 Windows 中这可能需要很多时间(显示第一个错误,因为管道不是管道)。
我的问题:
有没有办法只得到第一个错误?
您可以要求它在第一个错误处停止:
$ psql -v ON_ERROR_STOP=on --single-transaction ...
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1161 次 |
| 最近记录: |