<small id='UtDsI'></small><noframes id='UtDsI'>

  • <legend id='UtDsI'><style id='UtDsI'><dir id='UtDsI'><q id='UtDsI'></q></dir></style></legend>
      <bdo id='UtDsI'></bdo><ul id='UtDsI'></ul>

        <tfoot id='UtDsI'></tfoot>
      1. <i id='UtDsI'><tr id='UtDsI'><dt id='UtDsI'><q id='UtDsI'><span id='UtDsI'><b id='UtDsI'><form id='UtDsI'><ins id='UtDsI'></ins><ul id='UtDsI'></ul><sub id='UtDsI'></sub></form><legend id='UtDsI'></legend><bdo id='UtDsI'><pre id='UtDsI'><center id='UtDsI'></center></pre></bdo></b><th id='UtDsI'></th></span></q></dt></tr></i><div id='UtDsI'><tfoot id='UtDsI'></tfoot><dl id='UtDsI'><fieldset id='UtDsI'></fieldset></dl></div>
      2. DatabaseError:当前事务被中止,在事务块结束之前忽略命令?

        时间:2024-04-21

              • <bdo id='s1r3B'></bdo><ul id='s1r3B'></ul>
                <tfoot id='s1r3B'></tfoot>
                <legend id='s1r3B'><style id='s1r3B'><dir id='s1r3B'><q id='s1r3B'></q></dir></style></legend>

                <i id='s1r3B'><tr id='s1r3B'><dt id='s1r3B'><q id='s1r3B'><span id='s1r3B'><b id='s1r3B'><form id='s1r3B'><ins id='s1r3B'></ins><ul id='s1r3B'></ul><sub id='s1r3B'></sub></form><legend id='s1r3B'></legend><bdo id='s1r3B'><pre id='s1r3B'><center id='s1r3B'></center></pre></bdo></b><th id='s1r3B'></th></span></q></dt></tr></i><div id='s1r3B'><tfoot id='s1r3B'></tfoot><dl id='s1r3B'><fieldset id='s1r3B'></fieldset></dl></div>

              • <small id='s1r3B'></small><noframes id='s1r3B'>

                  <tbody id='s1r3B'></tbody>
                • 本文介绍了DatabaseError:当前事务被中止,在事务块结束之前忽略命令?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我收到了很多错误消息:

                  I got a lot of errors with the message :

                  "DatabaseError: current transaction is aborted, commands ignored until end of transaction block"
                  

                  从 python-psycopg 更改为 python-psycopg2 作为 Django 项目的数据库引擎之后.

                  after changed from python-psycopg to python-psycopg2 as Django project's database engine.

                  代码保持不变,只是不知道那些错误来自哪里.

                  The code remains the same, just don't know where those errors are from.

                  推荐答案

                  当查询产生错误并且您尝试运行另一个查询而不首先回滚事务时,这是 postgres 所做的.(您可能会将其视为一项安全功能,以防止您破坏数据.)

                  This is what postgres does when a query produces an error and you try to run another query without first rolling back the transaction. (You might think of it as a safety feature, to keep you from corrupting your data.)

                  要解决此问题,您需要找出代码中执行错误查询的位置.使用 log_statement<可能会有所帮助/a> 和 log_min_error_statement 您的 postgresql 服务器中的选项.

                  To fix this, you'll want to figure out where in the code that bad query is being executed. It might be helpful to use the log_statement and log_min_error_statement options in your postgresql server.

                  这篇关于DatabaseError:当前事务被中止,在事务块结束之前忽略命令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:Django 可选 url 参数 下一篇:如何克隆 Django 模型实例对象并将其保存到数据库中?

                  相关文章

                  1. <tfoot id='fqXjJ'></tfoot>

                      <legend id='fqXjJ'><style id='fqXjJ'><dir id='fqXjJ'><q id='fqXjJ'></q></dir></style></legend>

                        <bdo id='fqXjJ'></bdo><ul id='fqXjJ'></ul>
                    1. <i id='fqXjJ'><tr id='fqXjJ'><dt id='fqXjJ'><q id='fqXjJ'><span id='fqXjJ'><b id='fqXjJ'><form id='fqXjJ'><ins id='fqXjJ'></ins><ul id='fqXjJ'></ul><sub id='fqXjJ'></sub></form><legend id='fqXjJ'></legend><bdo id='fqXjJ'><pre id='fqXjJ'><center id='fqXjJ'></center></pre></bdo></b><th id='fqXjJ'></th></span></q></dt></tr></i><div id='fqXjJ'><tfoot id='fqXjJ'></tfoot><dl id='fqXjJ'><fieldset id='fqXjJ'></fieldset></dl></div>

                      <small id='fqXjJ'></small><noframes id='fqXjJ'>