Index: Connection.java =================================================================== RCS file: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/Connection.java,v retrieving revision 1.26 diff -c -r1.26 Connection.java *** Connection.java 2001/08/24 16:50:12 1.26 --- Connection.java 2001/08/31 18:08:00 *************** *** 906,912 **** if (autoCommit) ExecSQL("end"); else { ! ExecSQL("begin; " + getIsolationLevelSQL()); } this.autoCommit = autoCommit; } --- 906,913 ---- if (autoCommit) ExecSQL("end"); else { ! ExecSQL("begin"); ! ExecSQL(getIsolationLevelSQL()); } this.autoCommit = autoCommit; } *************** *** 935,941 **** public void commit() throws SQLException { if (autoCommit) return; ! ExecSQL("commit; begin; " + getIsolationLevelSQL()); } /** --- 936,944 ---- public void commit() throws SQLException { if (autoCommit) return; ! ExecSQL("commit"); ! ExecSQL("begin"); ! ExecSQL(getIsolationLevelSQL()); } /** *************** *** 949,955 **** public void rollback() throws SQLException { if (autoCommit) return; ! ExecSQL("rollback; begin; " + getIsolationLevelSQL()); } /** --- 952,960 ---- public void rollback() throws SQLException { if (autoCommit) return; ! ExecSQL("rollback"); ! ExecSQL("begin"); ! ExecSQL(getIsolationLevelSQL()); } /** *************** *** 1035,1055 **** if (haveMinimumServerVersion("7.1")) { return ""; } ! String q = "SET TRANSACTION ISOLATION LEVEL"; switch(isolationLevel) { case java.sql.Connection.TRANSACTION_READ_COMMITTED: ! q = q + " READ COMMITTED"; break; case java.sql.Connection.TRANSACTION_SERIALIZABLE: ! q = q + " SERIALIZABLE"; break; default: throw new PSQLException("postgresql.con.isolevel",new Integer(isolationLevel)); } ! return q; } /** --- 1040,1060 ---- if (haveMinimumServerVersion("7.1")) { return ""; } ! StringBuffer sb = new StringBuffer("SET TRANSACTION ISOLATION LEVEL"); switch(isolationLevel) { case java.sql.Connection.TRANSACTION_READ_COMMITTED: ! q.append(" READ COMMITTED"); break; case java.sql.Connection.TRANSACTION_SERIALIZABLE: ! q.append(" SERIALIZABLE"); break; default: throw new PSQLException("postgresql.con.isolevel",new Integer(isolationLevel)); } ! return q.toString(); } /**