current transaction is aborted, commands ignored until end of transaction block

Error updating database. Cause: org.postgresql.util.PSQLException: ERROR: syntax error at or near "where"
Position: 36
### The error may involve com.project.mapper.PProjectLedgerMapper.updateByPrimaryKeySelective-Inline
### The error occurred while setting parameters
### SQL: update p_project_ledger where id = ?
### Cause: org.postgresql.util.PSQLException: ERROR: syntax error at or near "where"
Position: 36
; bad SQL grammar []; nested exception is org.postgresql.util.PSQLException: ERROR: syntax error at or near "where"

整个事务中,有SQL编译失败,导致整个事务被放弃中止。
据说此异常捕获无效,是数据库层面的一种机制。

起因是更新字段时,有更新字段值为空,使用updateByPrimaryKeySelective时,自动过滤掉空字段,导致数据库层面编译错误。

使用数据库 postgreSQL

current transaction is aborted, commands ignored until end of transaction block的更多相关文章

  1. navicat中执行PostgreSQL错误解决:ERROR: current transaction is aborted, commands ignored until end of transaction block

    错误出现: 含有错误的查询后,选中insert语句无法执行,报错current transaction is aborted, commands ignored until end of transa ...

  2. org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is org.hibernate.exception.JDBCConnectionException: Cannot open con

    org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session f ...

  3. The Microsoft Distributed Transaction Coordinator (MS DTC) has cancelled the distributed transaction.

    同事反馈一个系统在运行一个存储过程时遇到了下面错误: Msg 1206, Level 18, State 169, Procedure xxxxxx, Line 118The Microsoft Di ...

  4. SQL Server does not purge row versioning records even the transaction are committed if there are other open transaction running in the databases with read-committed snapshot enabled .

    This is a by-design behavior. There is only one allocation unit in tempdb that istracking the versio ...

  5. PostgreSQL数据库中的常见错误

    转载以作参考. 错误1 FATAL: connection limit exceeded for non-superusers 原因:非超级用户的连接数(max_connections - super ...

  6. postgresql 关闭自动提交

    1. 简介说明             我们知道oracle中sqlplus里面执行dml语句:是需要提交commit:若错了:也可以回滚rollback: 然而在postgresql里面默认是自动提 ...

  7. (13)odoo翻译

    -------------------更新时间:15:52 2016-09-28 星期三 增加模型名翻译17:26 2016-05-20 星期五17:58 2016-05-17 星期二12:14 20 ...

  8. 2017.7.7 postgreSQL在插入造成重复时执行更新

    参考来自:https://stackoverflow.com/questions/1109061/insert-on-duplicate-update-in-postgresql/1109198#11 ...

  9. process_thread_action

    import psycopg2 import threading conn_fmac = psycopg2.connect(database='filter_useless_mac', user='u ...

随机推荐

  1. nginx 常见的问题

    1.server匹配优先级 nginx 读取文件名是按照文件排序优先读取的顺序    对与一样的server 优先使用先读取到的 2.location匹配优先级 =    进行普通字符精确匹配,也就是 ...

  2. day39_8_23mysql的其他内容(视图等)

    一.视图 MySQL中有一种比较方便的表,就是视图(view). 什么是视图? 视图就是通过查询获得一张虚拟表,然后将其保存,下次可以直接使用这个视图. 使用视图就可以不需要重复查询/连接表,在代码层 ...

  3. RST复位报文

    复位报文段: 一些特殊情况,TCP一端向另一端发送复位报文,以通知对方关闭链接或者重新建立链接. 产生复位报文的三种情况: 1. 当客户端访问一个不存在的端口时,目标主机会给客户端发送一个复位报文段. ...

  4. (day45)JavaScript

    目录 一.什么是JavaScript 二.注释 三.引入方式 (1)script标签内联 (2)script标签外联 四.变量 (一)变量声明 (二)命名规范 五.数据类型 (一)数值类型Number ...

  5. __str__与__repr__的触发顺序总结

    1.__str__是个内置的方法,无需使用者去调用,其会在满足某一条件时自动触发.那么要触发它运行都有哪些条件呢? 有三种条件,分别为:print , str , %s 2.__repr__同样是个内 ...

  6. [LeetCode] 337. House Robber III 打家劫舍之三

    The thief has found himself a new place for his thievery again. There is only one entrance to this a ...

  7. vue 图片放大镜效果

    插件名称:vue-photo-zoom-pro https://github.com/Mater1996/vue-photo-zoom-pro 效果图  使用: <template> &l ...

  8. 在 Vue 中使用 装饰器 Decorator

    Decorator 的语法还没有通过提案,所以项目中很少用.不过最近刚好有一个需求用到了. 装饰器的语法 http://es6.ruanyifeng.com/#docs/decorator 需求是,有 ...

  9. SVN全局文件过滤规则设置

    */packages */packages/* */.vs/* */.vs */.git/* */.git *.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a ...

  10. nginx学习笔记2

    nginx基础配置 一.nginx常用命令 nginx -s reload:在nginx已经启动的情况下重新加载配置文件(平滑重启) nginx -s reopen:重新打开日志文件 nginx -c ...