-
Notifications
You must be signed in to change notification settings - Fork 38.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SimpleJdbcCall does not find stored function with PostgreSQL driver 42.2.11 #25399
Comments
This is arguably a breaking change mid-way in the PostgreSQL driver, but given that they're unlikely to revert it and that JDBC 4 did indeed introduce a distinction between procedures and functions, I've revised our I suppose this addresses your scenario. Please test it against the upcoming Spring Framework 5.2.8 snapshot once committed. |
…meter metadata Version 42.2.11 of the PostgreSQL JDBC driver introduced a backwards-incompatible change in PgDatabaseMetaData.getProcedures, called internally, to only return procedures (introduced in PSQL 11). See spring-projects/spring-framework#25399 for more details As a workaround, we disable the processing of parameter metadata obtained via JDBC and explicitly redeclare the function parameters. This change is the least-invasive requirement in order the upgrade the org.postgresql:postgresql dependency at the omero-server component.
Affects: <5.2.5.RELEASE>
We use Spring Boot 2.2.6.RELEASE, which includes jdbc driver PostgreSQL version 42.2.11.
We use
SimpleJdbcCall
for calling stored function in PostgreSQL database version 11.1.But when we called stored function, we got
InvalidDataAccessApiUsageException
with messageUnable to determine the correct call signature - no procedure/function/signature for 'set_application_variables'
.I looked under the hood and saw that at the stage compile stored function and gather meta information for it, we call
PgDatabaseMetaData.getProcedures(String catalog, String schemaPattern, String procedureNamePattern)
.In the version 42.2.11 PostgreSQL jdbc driver was added verification for returning only procedures.
Class where we call stored function.
Stored function.
Workaround: as workaround we turned off verification meta data via JDBC with method
withoutProcedureColumnMetaDataAccess()
inSimpleJdbcCall
.The text was updated successfully, but these errors were encountered: