我正在输入类似的内容:
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 中这可能需要很多时间(显示第一个错误,因为管道不是管道)。
我的问题:
有没有办法只得到第一个错误?