当前位置:   article > 正文

postgresql org.postgresql.util.PSQLException: ERROR: could not determine data type of parameter $9

org.postgresql.util.psqlexception: error: could not determine data type of p

这个错误是在配置url时加上了stringtype=unspecified所导致的,加上这个可以将json类型转化为字符串类型存储在数据库。但是在模糊查询

SELECT * FROM table1 WHERE coulums1 LIKE CONCAT('%', #{arg}, '%')
  • 1

时会报参数类型不明确的异常
在这里插入图片描述
可以加一个强制类型转换

SELECT * FROM table1 WHERE coulums1 LIKE CONCAT('%', #{arg}::text, '%')
  • 1
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/知新_RL/article/detail/972468
推荐阅读
相关标签
  

闽ICP备14008679号