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. flask中利用session实现用户记住密码

    “记住密码”的实质,实际上就是把cookie的有效期设置的长一点,当用户没有选择记住密码时,cookie的有效期为会话结束,选择记住密码后,会根据服务器的设置延长cookie的有效期,默认是31天.在 ...

  2. 并发、并行、同步、异步、全局解释锁GIL、同步锁Lock、死锁、递归锁、同步对象/条件、信号量、队列、生产者消费者、多进程模块、进程的调用、Process类、

    并发:是指系统具有处理多个任务/动作的能力. 并行:是指系统具有同时处理多个任务/动作的能力. 并行是并发的子集. 同步:当进程执行到一个IO(等待外部数据)的时候. 异步:当进程执行到一个IO不等到 ...

  3. Spring Cloud微服务安全实战_4-5_搭建OAuth2资源服务器

    上一篇搭建了一个OAuth2认证服务器,可以生成token,这篇来改造下之前的订单微服务,使其能够认这个token令牌. 本篇针对订单服务要做三件事: 1,要让他知道自己是资源服务器,他知道这件事后, ...

  4. Linux性能优化实战学习笔记:第二十七讲

    一.案例环境描述 1.环境准备 2CPU,4GB内存 预先安装docker sysstat工具 2.温馨提示 案例中 Python 应用的核心逻辑比较简单,你可能一眼就能看出问题,但实际生产环境中的源 ...

  5. vue_02day练习

    目录 vue_02day 作业 vue 框架 :成绩单的实现 v-for 与 v-if 联用: 3.添加筛选规则(深入) : 留言功能的页面实现: vue_02day 作业 1. 先有一下成绩单数据 ...

  6. [LeetCode] 382. Linked List Random Node 链表随机节点

    Given a singly linked list, return a random node's value from the linked list. Each node must have t ...

  7. vue图片放大、缩小、旋转等

    用于图片浏览的Vue组件,支持旋转.缩放.翻转等操作,基于viewer.js. 效果: 安装 使用npm命令安装 npm install v-viewer 使用 引入v-viewer及必需的css样式 ...

  8. php-fpm指定配置文件及php相关配置命令

    [root@hostname centos7 sbin]# ./php-fpm -c /usr/local/php/etc/php.ini -y /usr/local/php/etc/php-fpm. ...

  9. 热情组——项目冲刺 Day5

    项目相关 作业相关 具体描述 班级 班级链接 作业要求 链接地址 团队名称 热情组 作业目标 实现软件制作,以及在福大的传播 Github链接 链接地址 SCRUM部分: 成员昵称 昨日目标 开始时间 ...

  10. PDF提取图片(错误纠正)

    有个任务需要抽取pdf中的图片,于是找了一个例子但是有错误,仅此记录下 错误1. AttributeError: 'Document' object has no attribute 'getObje ...