We seem to get below error with Postgres Stored procedure during integration test or while we test /procedure/{procName} endpoint using Postman:
Caused by: org.postgresql.util.PSQLException: ERROR: getmovierentalrateproc(character varying) is a procedure
Hint: To call a procedure, use CALL.
Position: 15
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2713)
When we test using Postman, please make sure DB_URL is configured as:
DB_URL=jdbc:postgresql://localhost:5432/sakila?escapeSyntaxCallMode=callIfNoReturn
When running integration test we can add below config to the datasource:
dataSourceBuilder.url(testPostgres.getJdbcUrl() + "&escapeSyntaxCallMode=callIfNoReturn");
We seem to get below error with Postgres Stored procedure during integration test or while we test /procedure/{procName} endpoint using Postman:
After PostgreSQL 11, PostgreSQL JDBC driver team has introduced a ENUM name EscapeSyntaxCallMode in PostgreSQL driver version 42.2.16... https://stackoverflow.com/questions/65696904/postgresql-11-stored-procedure-call-error-to-call-a-procedure-use-call-java
When we test using Postman, please make sure DB_URL is configured as: DB_URL=
jdbc:postgresql://localhost:5432/sakila?escapeSyntaxCallMode=callIfNoReturn
When running integration test we can add below config to the datasource:
dataSourceBuilder.url(testPostgres.getJdbcUrl() + "&escapeSyntaxCallMode=callIfNoReturn");