I call a procedure in the following way:
CallableStatement delete_procedure = connection.prepareCall("{ call schema.delete( ? ) }");
delete_procedure.setInt(1, id);
delete_procedure.execute();
delete_procedure.close();
connection.close();
When I run the command delete_procedure.execute()
, the program crashes. I do not experience any exceptions. What is causing this behavior? I am using the following function, which works fine:
CREATE OR REPLACE FUNCTION schema.delete(integer)
RETURNS void AS
alter table schema.table disable trigger del_trg;
delete from schema.table where id = $1;
alter table schema.table enable trigger del_trg;