Patch for handling "autocommit=false" in postgresql.conf

From: snpe <snpe(at)snpe(dot)co(dot)yu>
To: pgsql-jdbc <pgsql-jdbc(at)postgresql(dot)org>
Subject: Patch for handling "autocommit=false" in postgresql.conf
Date: 2002-09-17 12:25:50
Message-ID: 200209171425.50940.snpe@snpe.co.yu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hello,
This is patch for handle JDBC for autocommit=false in postgresql.conf

Patch set autocommit mode to true (on) for JDBC compliant.
--- AbstractJdbc1Connection.java.orig Tue Sep 17 02:23:49 2002
+++ AbstractJdbc1Connection.java Tue Sep 17 02:27:52 2002
@@ -366,6 +366,11 @@
// Initialise object handling
initObjectTypes();

+ // handle autocommit=false in postgresql.conf
+ if (haveMinimumServerVersion("7.3")) {
+ ExecSQL("set autocommit to on; commit;");
+ }
+
// Mark the connection as ok, and cleanup
PG_STATUS = CONNECTION_OK;
}
regards
Haris Peco

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Tom Lane 2002-09-17 14:26:14 Re: Patch for handling "autocommit=false" in postgresql.conf
Previous Message H. Meyer 2002-09-17 12:01:22 Postgres 7.3b1 + JDBC3 (2002-09-05) truncates SQL commands?