From: | "Sziklai Gabor" <gsziklai(at)ikron(dot)hu> |
---|---|
To: | <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: Warning on transaction commit |
Date: | 2003-01-14 08:39:52 |
Message-ID: | 00b801c2bba8$823c87a0$0a00a8c0@ibase |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers 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
>
From | Date | Subject | |
---|---|---|---|
Next Message | Julian Scarfe | 2003-01-14 09:46:16 | Vacuum verbose output? |
Previous Message | Dave Page | 2003-01-14 08:24:50 | Re: \d type queries - why not views in system catalog?!? |
From | Date | Subject | |
---|---|---|---|
Next Message | Barry Lind | 2003-01-14 09:18:06 | Re: Truncation bug when retrieving timestamps with fractional |
Previous Message | Barry Lind | 2003-01-14 05:48:36 | Re: Patch so Pooled Connections are PGConnections |