--- org/postgresql/ds/common/BaseDataSource.java.ORIG	2008-05-20 17:08:57.000000000 +0300
+++ org/postgresql/ds/common/BaseDataSource.java	2008-05-21 09:55:21.000000000 +0300
@@ -51,6 +51,7 @@
     private int loginTimeout; // in seconds
     private boolean ssl = false;
     private String sslfactory;
+    private String compatible;
 
     /**
      * Gets a connection to the PostgreSQL database.  The database is identified by the
@@ -154,6 +155,16 @@
         }
     }
 
+    public String getCompatible()
+    {
+        return compatible;
+    }
+
+    public void setCompatible(String compatible)
+    {
+        this.compatible = compatible;
+    }
+
     /**
      * Gets the name of the PostgreSQL database, running on the server identified
      * by the serverName property.
@@ -323,6 +334,7 @@
                 sb.append("&sslfactory=").append(sslfactory);
             }
         }
+	if (compatible != null) sb.append("&compatible="+compatible);
 
         return sb.toString();
     }
@@ -357,6 +369,12 @@
         
         ref.add(new StringRefAddr("prepareThreshold", Integer.toString(prepareThreshold)));
         ref.add(new StringRefAddr("loginTimeout", Integer.toString(loginTimeout)));
+
+	if (compatible != null)
+	{
+		ref.add(new StringRefAddr("compatible", compatible));
+	}
+	
         return ref;
     }
 
@@ -369,6 +387,7 @@
         out.writeInt(portNumber);
         out.writeInt(prepareThreshold);
         out.writeInt(loginTimeout);
+        out.writeObject(compatible);
     }
 
     protected void readBaseObject(ObjectInputStream in) throws IOException, ClassNotFoundException
@@ -380,6 +399,7 @@
         portNumber = in.readInt();
         prepareThreshold = in.readInt();
         loginTimeout = in.readInt();
+        compatible = (String)in.readObject();
     }
 
 }
