Index: Connection.java
===================================================================
RCS file: /usr/local/cvsroot/pgsql/src/interfaces/jdbc/postgresql/Connection.java,v
retrieving revision 1.17
diff -u -r1.17 Connection.java
--- Connection.java	1999/05/18 23:17:15	1.17
+++ Connection.java	1999/06/01 16:03:28
@@ -36,6 +36,7 @@
   
   public boolean autoCommit = true;
   public boolean readOnly = false;
+  public int     isolationLevel = java.sql.Connection.TRANSACTION_READ_COMMITTED;
   
   public Driver this_driver;
   private String this_url;
@@ -262,6 +263,13 @@
 	//if(msg.startsWith(dateStyles[i]))
 	//currentDateStyle=i+1; // this is the index of the format
 	//}
+
+	if(msg.startsWith("NOTICE:") && msg.indexOf("TRANSACTION ISOLATION LEVEL")>0) {
+	    msg = msg.substring(msg.indexOf("TRANSACTION ISOLATION LEVEL is ")+31);
+	    if(msg.equals("SERIALIZABLE"))
+		isolationLevel = java.sql.Connection.TRANSACTION_SERIALIZABLE;
+	    else isolationLevel = java.sql.Connection.TRANSACTION_READ_COMMITTED;
+	}
     }
     
     /**
Index: jdbc1/Connection.java
===================================================================
RCS file: /usr/local/cvsroot/pgsql/src/interfaces/jdbc/postgresql/jdbc1/Connection.java,v
retrieving revision 1.2
diff -u -r1.2 Connection.java
--- jdbc1/Connection.java	1999/05/18 23:17:21	1.2
+++ jdbc1/Connection.java	1999/06/01 16:03:29
@@ -311,7 +311,11 @@
    */
   public void setTransactionIsolation(int level) throws SQLException
   {
-    throw postgresql.Driver.notImplemented();
+      if(level == java.sql.Connection.TRANSACTION_READ_COMMITTED)
+	  ExecSQL("set transaction isolation level read commited");
+      else if(level == java.sql.Connection.TRANSACTION_SERIALIZABLE)
+	  ExecSQL("set transaction isolation level serializable");
+      else throw postgresql.Driver.notImplemented();
   }
   
   /**
@@ -322,7 +326,9 @@
    */
   public int getTransactionIsolation() throws SQLException
   {
-    return java.sql.Connection.TRANSACTION_SERIALIZABLE;
+      ExecSQL("show transaction isolation level");
+      
+      return isolationLevel;
   }
   
   /**
Index: jdbc1/DatabaseMetaData.java
===================================================================
RCS file: /usr/local/cvsroot/pgsql/src/interfaces/jdbc/postgresql/jdbc1/DatabaseMetaData.java,v
retrieving revision 1.1
diff -u -r1.1 DatabaseMetaData.java
--- jdbc1/DatabaseMetaData.java	1999/01/17 04:51:54	1.1
+++ jdbc1/DatabaseMetaData.java	1999/06/01 16:03:41
@@ -1350,7 +1350,7 @@
    */
   public int getDefaultTransactionIsolation() throws SQLException
   {
-    return Connection.TRANSACTION_SERIALIZABLE;
+    return Connection.TRANSACTION_READ_COMMITTED;
   }
   
   /**
@@ -1379,8 +1379,9 @@
   {
     if (level == Connection.TRANSACTION_SERIALIZABLE)
       return true;
-    else
-      return false;
+    else if(level == Connection.TRANSACTION_READ_COMMITTED)
+      return true;
+    else return false;
   }
   
   /**
Index: jdbc2/Connection.java
===================================================================
RCS file: /usr/local/cvsroot/pgsql/src/interfaces/jdbc/postgresql/jdbc2/Connection.java,v
retrieving revision 1.2
diff -u -r1.2 Connection.java
--- jdbc2/Connection.java	1999/05/18 23:17:26	1.2
+++ jdbc2/Connection.java	1999/06/01 16:03:52
@@ -311,7 +311,11 @@
    */
   public void setTransactionIsolation(int level) throws SQLException
   {
-      throw postgresql.Driver.notImplemented();
+      if(level == java.sql.Connection.TRANSACTION_READ_COMMITTED)
+	  ExecSQL("set transaction isolation level read commited");
+      else if(level == java.sql.Connection.TRANSACTION_SERIALIZABLE)
+	  ExecSQL("set transaction isolation level serializable");
+      else throw postgresql.Driver.notImplemented();     
   }
   
   /**
@@ -322,7 +326,9 @@
    */
   public int getTransactionIsolation() throws SQLException
   {
-    return java.sql.Connection.TRANSACTION_SERIALIZABLE;
+      ExecSQL("show transaction isolation level");
+      
+      return isolationLevel;
   }
   
   /**
Index: jdbc2/DatabaseMetaData.java
===================================================================
RCS file: /usr/local/cvsroot/pgsql/src/interfaces/jdbc/postgresql/jdbc2/DatabaseMetaData.java,v
retrieving revision 1.1
diff -u -r1.1 DatabaseMetaData.java
--- jdbc2/DatabaseMetaData.java	1999/01/17 04:51:56	1.1
+++ jdbc2/DatabaseMetaData.java	1999/06/01 16:04:01
@@ -1350,7 +1350,7 @@
    */
   public int getDefaultTransactionIsolation() throws SQLException
   {
-    return Connection.TRANSACTION_SERIALIZABLE;
+    return Connection.TRANSACTION_READ_COMMITTED;
   }
   
   /**
@@ -1378,6 +1378,8 @@
   public boolean supportsTransactionIsolationLevel(int level) throws SQLException
   {
     if (level == Connection.TRANSACTION_SERIALIZABLE)
+      return true;
+    else if (level == Connection.TRANSACTION_READ_COMMITTED)
       return true;
     else
       return false;