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. bind 仿造 重写bind

    简单版,不带参数 Function.prototype.my_bind = function(targ){ var _this = this; return function(){ _this.app ...

  2. LeetCode 654. Maximum Binary Tree最大二叉树 (C++)

    题目: Given an integer array with no duplicates. A maximum tree building on this array is defined as f ...

  3. jsp转long类型为date,并且格式化

    方式一.使用java脚本 <% Long time = (Long)request.getAttribute("longtime"); Date date=new Date( ...

  4. UML系列

    UML类图:https://www.cnblogs.com/shindo/p/5579191.html UML用例图:https://www.jianshu.com/p/3cde67aed8e9 UM ...

  5. mission3--dp

    A---母牛的故事 题目大意:第一年有一头母牛,每年年初母牛生小母牛,小母牛第四个年头可以开始生小牛. 问第n年有多少头牛. 题解: (1)列出前几项来找规律(2)第i年牛的数量=第i-1年牛的数量+ ...

  6. [LeetCode] 921. Minimum Add to Make Parentheses Valid 使括号有效的最少添加

    Given a string S of '(' and ')' parentheses, we add the minimum number of parentheses ( '(' or ')', ...

  7. [LeetCode] 647. Palindromic Substrings 回文子字符串

    Given a string, your task is to count how many palindromic substrings in this string. The substrings ...

  8. [LeetCode] 281. The Skyline Problem 天际线问题

    A city's skyline is the outer contour of the silhouette formed by all the buildings in that city whe ...

  9. 部署WP程序到自己的手机

    参考的地址 http://www.cnblogs.com/zigzagPath/p/3313831.html

  10. 排列组合(包括n中随机抽取m个)

    有些情况我们需要获取一个数组中的所有排列组合情况,或者获取一部分数据进行随机组合,这个在python中有一个模块可以实现.具体情况如下 :::::::::::::::::::::::::::::::: ...