I have a PL/pgsql function called "move_records" that does not take any parameters and does not return any results. It
performsinserts on a few tables (as the name suggests, it copies records from one table to another).
When I run this function using pgAdminIII's query window, using the command "select move_records()", it executes
correctlyand as expected.
However, when I call the function via JDBC, it runs, but appears to do nothing. It's as if nothing it does is getting
committed.The relevant Java code is:
CallableStatement statement = connection.prepareCall("{call move_records()}");
statement.execute();
At first I thought it was not running at all, so I put in "RAISE INFO" statements to see if it was actually working --
andthose did indeed print statements. So I know for sure it is actually running. I tried commenting out different
thingsin case it was failing silently, but that made no difference. Running the stored procedure does not return any
errorsor warnings.
There must be something really obvious I'm overlooking?
Any help would be greatly appreciated!