One can call postgresql function or procedure using below method from information link
call procedure with?escapeSyntaxCallMode=callIfNoReturn
jdbc:postgresql://<host>:<port>/database?escapeSyntaxCallMode=callIfNoReturn
call function w/o ?escapeSyntaxCallMode=callIfNoReturn
jdbc:postgresql://<host>:<port>/database
however, one can not use the same data source for both. The workaround is to create a seperate data sources for each of them.
as per support, this is not supported yet.
While the JDBC driver includes a setting (escapeSyntaxCallMode=callIfNoReturn) designed to auto-detect the correct mode, it requires the application to signal whether it is calling a function or a procedure and we don't have this.