I implemented a PostgresSQL stored procedure call from Quarkus JPA in the way that Davide suggested here:
Quarkus REST API with Hibernate/Panache - Endpoints querying Postgres Stored Procedure
However calling the stored procedure always fails with the following error: org.postgresql.util.PSQLException: ERROR: generate_sums(bigint, bigint, bigint) is a procedure Hint: To call a procedure, use CALL.
After doing some research I think that this is my problem:
https://github.com/pgjdbc/pgjdbc/issues/1413
However according to this post this issue has been fixed with the Postgres JDBC driver Version higher than 42.2.16:
Postgresql 11: Stored Procedure call error - To call a procedure, use CALL, Java
Only difference: they are talking about Spring here, not Quarkus. But looking at the problem this should not make a difference.
I checked the Maven dependency tree of my Quarkus application and noticed that it uses 42.2.22. So a version which includes this fix.
However, I still get this error when trying to call the PostgresSQL Stored Procedure from Quarkus.
The only difference to Davides example is that I don't provide a ResultClass since my procedure is a INSERT SELECT statement which fills a table based on other tables and does not return anything.
I am using Quarkus 2.0.