Re: Warning on transaction commit

Поиск
Список
Период
Сортировка
От Sziklai Gabor
Тема Re: Warning on transaction commit
Дата
Msg-id 00b801c2bba8$823c87a0$0a00a8c0@ibase
обсуждение исходный текст
Ответ на Warning on transaction commit  (Jeremy Buchmann <jeremy@wellsgaming.com>)
Список pgsql-jdbc
Greetings,

As far as I know, the implementation of setAutoCommit( true ) is sending an
"END"
to the backend. Since you had just committed before, there is no transaction
taking place - hence the warning.

Setting autocommit to false entails that each commit() will send a
"COMMIT;BEGIN;" to the backend, while each rollback() will send a
"ROLLBACK;BEGIN;".

Regards,

Gabor

> I'm getting a warning message in my logs that looks like this:
>
> WARNING:  COMMIT: no transaction in progress
>
> when I run this code:
>
> dbh.setAutoCommit(false);
> Statement doEvents = dbh.createStatement();
> doEvents.executeUpdate("DELETE FROM ...");
> doEvents.executeUpdate("INSERT INTO ...");
> dbh.commit();
> dbh.setAutoCommit(true);
>
> The statements do what they're supposed to do, but I don't understand
> why I'm getting that warning message.  Anyone know why?
>
> I'm running PostgreSQL 7.3.1 and using the PostgreSQL 7.3 JDBC 2 driver
> that I just downloaded a couple days ago from jdbc.postgresql.org.
>
> Thanks,
> --Jeremy
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>


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

Предыдущее
От: Barry Lind
Дата:
Сообщение: Re: Patch so Pooled Connections are PGConnections
Следующее
От: Barry Lind
Дата:
Сообщение: Re: Truncation bug when retrieving timestamps with fractional