Spring SimpleJDBCall:不存在函数错误
我在执行存储过程时遇到异常。例外情况如下Spring SimpleJDBCall:不存在函数错误,spring,Spring,我在执行存储过程时遇到异常。例外情况如下 org.springframework.jdbc.BadSqlGrammarException:CallableStatementCallback;badSQLgrammar[{调用find_spot()}];nestedexception是org.postgresql.util.PSQLException:错误:functionfind_spot() 不存在提示:没有与给定名称和参数类型匹配的函数。您可能需要添加显式类型转换。位置:15 它的声明函数f
org.springframework.jdbc.BadSqlGrammarException:CallableStatementCallback;badSQLgrammar[{调用find_spot()}];nestedexception是org.postgresql.util.PSQLException:错误:functionfind_spot()
不存在提示:没有与给定名称和参数类型匹配的函数。您可能需要添加显式类型转换。位置:15
它的声明函数find_spot()不存在,但我在数据库中检查了这个过程。我正在使用Postgresql[DBeaver]
有人能帮我解决这个问题吗?您应该使用json进行搜索或使用json访问查询,请参见示例:
select * from table where cast(field_json as varchar(500)) !~ 'reg_ex' and id = 11
或
select field_json->>'key' from table where field_json->>'key' ilike 'value'