I am working with postgresql procedures and trying to call a procedure from my JDBC program. But getting runtime exception saying procedure doesn't exist eventhough I cross-checked and verified that the procedure name is correct. This is what I am doing
CallableStatement cs = connection.prepareCall("{call proc1()}");
cs.executeUpdate();
And here's my proc1 procedure
create or replace procedure proc1()
as
begin
insert into employee_info values(1,'johnny','1111',43);
-----
end
This is what the output is
Connection Failed! ERROR: function proc1() does not exist
Hint: No function matches the given name and argument types. You might need to add explicit type casts.
I dont understand why its not working eventhough proc1() exists in database. And what should i Cast?
create or replace procedurein Postgrescreate or replace functionstatement.create procedureis a syntax accepted by PostgresPlus, a postgres fork aimed at oracle compatibility.