Closed
Description
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
inside jdbcUrl
parameter like this:
jdbc:postgresql://localhost:5455/userdb?currentSchema=customschema
"Standard" queries such as jdbcTemplate.query(...)
use the correct schema which is customschema
.
Though when I try to call a stored procedure through SimpleJdbcCall
, it uses the default postgres schema public
.
new SimpleJdbcCall(jdbcTemplate).withFunctionName("custom_stored_procedure_name").execute();
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".