You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Spring Boot中SimpleJdbcCall无法识别大写Schema下PostgreSQL函数的问题求助

Spring Boot中SimpleJdbcCall无法识别大写Schema下PostgreSQL函数的问题求助

大家好,我在Spring Boot项目里遇到了一个棘手的问题,想请各位帮忙分析下:

我需要动态传入Schema和函数名来调用PostgreSQL的函数,于是用SimpleJdbcCall来实现,代码如下:

Integer result = new SimpleJdbcCall(datasource)
        .withSchemaName("TEST")
        .withFunctionName("get_data")
        .withReturnValue()
        .executeFunction(Integer.class);

执行这段代码时,我一直收到错误提示:Unable to determine the correct call signature - no procedure/function/signature for 'get_data'

经过反复测试,我发现问题出在Schema的大小写上:只要把Schema名改成小写,代码就能正常执行;但使用大写的Schema名(比如上面的"TEST")就会触发这个错误。

后来我查阅了PostgreSQL驱动包(PostgreSql-42.2.1.jar)的源码,发现问题的根源在PgDatabaseMetaData类中。

备注:内容来源于stack exchange,提问作者Гончаренко Александр

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.15 11:03:05