You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
jhoeller
changed the title
Wrong schema used when calling a stored procedure through SimpleJdbcCall
SimpleJdbcCall should detect current schema as indicated by the JDBC Connection
Nov 24, 2023
jhoeller
changed the title
SimpleJdbcCall should detect current schema as indicated by the JDBC Connection
PostgresCallMetaDataProvider should detect current schema as indicated by the JDBC Connection
Nov 24, 2023
Hi,
I have issues trying to call a stored procedure using postgresql database through a
SimpleJdbcCall
.I set the current schema to use with the parameter
currentSchema
insidejdbcUrl
parameter like this:jdbc:postgresql://localhost:5455/userdb?currentSchema=customschema
"Standard" queries such as
jdbcTemplate.query(...)
use the correct schema which iscustomschema
.Though when I try to call a stored procedure through
SimpleJdbcCall
, it uses the default postgres schemapublic
.I know I can force the use of
customschema
on each call with.withSchemaName("customschema")
, but I shouldn't need to do this.While debugging, if I look at
jdbcTemplate.getDataSource().getConnection().getSchema()
, it returns the correct schema which is "customschema".The text was updated successfully, but these errors were encountered: