[BUG-postgresql] org.postgresql.util.PSQLException: ERROR: syntax error at or near “current_date“

环境:

        spring cloud  + Mybatis-plus + postgresql

场景:

  •  表插入时提示

        org.postgresql.util.PSQLException: ERROR: syntax error at or near "current_date"

 产生原因:

        current_date() 为 sql 的方法,current_date为方法名

解决方法:

        current_date改为create_date (这里随意,非方法名即可)

分析过程:

        XML 文件 和 navicate 中该报错语句,显示current_date为绿色(关键字颜色)

猜你喜欢

转载自blog.csdn.net/ladymorgana/article/details/121331199