JDBC: pl/pgsql function runs but does not do anything

Поиск
Список
Период
Сортировка
От Rob W
Тема JDBC: pl/pgsql function runs but does not do anything
Дата
Msg-id 806276.32534.qm@web34607.mail.mud.yahoo.com
обсуждение исходный текст
Ответы Re: JDBC: pl/pgsql function runs but does not do anything  (John DeSoi <desoi@pgedit.com>)
Список pgsql-novice
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!


В списке pgsql-novice по дате отправления:

Предыдущее
От: Michael Wood
Дата:
Сообщение: Re: Selecting time periods
Следующее
От: John DeSoi
Дата:
Сообщение: Re: JDBC: pl/pgsql function runs but does not do anything