@@ -24,10 +24,10 @@ import org.postgresql.util.PSQLException;
2424 * @see org.postgresql.Connection
2525 * @see java.sql.Driver
2626 */
27- public class Driver implements java.sql.Driver
27+ public class Driver implements java.sql.Driver
2828{
29-
30- static
29+
30+ static
3131 {
3232 try {
3333 // moved the registerDriver from the constructor to here
@@ -39,7 +39,7 @@ public class Driver implements java.sql.Driver
3939 e.printStackTrace();
4040 }
4141 }
42-
42+
4343 /**
4444 * Construct a new driver and register it with DriverManager
4545 *
@@ -54,7 +54,7 @@ public class Driver implements java.sql.Driver
5454 //} else {
5555 //connectClass = "postgresql.jdbc2.Connection";
5656 //}
57-
57+
5858 // Ok, when the above code was introduced in 6.5 it's intention was to allow
5959 // the driver to automatically detect which version of JDBC was being used
6060 // and to detect the version of the JVM accordingly.
@@ -71,7 +71,7 @@ public class Driver implements java.sql.Driver
7171 // For this to work, the Makefile creates a pseudo class which contains the class
7272 // name that will actually make the connection.
7373 }
74-
74+
7575 /**
7676 * Try to make a database connection to the given URL. The driver
7777 * should return "null" if it realizes it is the wrong kind of
@@ -85,12 +85,12 @@ public class Driver implements java.sql.Driver
8585 *
8686 * <p>The java.util.Properties argument can be used to pass arbitrary
8787 * string tag/value pairs as connection arguments. Normally, at least
88- * "user" and "password" properties should be included in the
89- * properties. In addition, the "charSet" property can be used to
90- * set a character set encoding (e.g. "utf-8") other than the platform
91- * default (typically Latin1). This is necessary in particular if storing
88+ * "user" and "password" properties should be included in the
89+ * properties. In addition, the "charSet" property can be used to
90+ * set a character set encoding (e.g. "utf-8") other than the platform
91+ * default (typically Latin1). This is necessary in particular if storing
9292 * multibyte characters in the database. For a list of supported
93- * character encoding , see
93+ * character encoding , see
9494 * http://java.sun.com/products/jdk/1.2/docs/guide/internat/encoding.doc.html
9595 * Note that you will probably want to have set up the Postgres database
9696 * itself to use the same encoding, with the "-E <encoding>" argument
@@ -112,7 +112,7 @@ public class Driver implements java.sql.Driver
112112 {
113113 if((props = parseURL(url,info))==null)
114114 return null;
115-
115+
116116 try {
117117org.postgresql.Connection con = (org.postgresql.Connection)(Class.forName("@JDBCCONNECTCLASS@").newInstance());
118118con.openConnection (host(), port(), props, database(), url, this);
@@ -127,7 +127,7 @@ public class Driver implements java.sql.Driver
127127throw new PSQLException("postgresql.unusual",ex2);
128128 }
129129 }
130-
130+
131131 /**
132132 * Returns true if the driver thinks it can open a connection to the
133133 * given URL. Typically, drivers will return true if they understand
@@ -146,7 +146,7 @@ public class Driver implements java.sql.Driver
146146 return false;
147147 return true;
148148 }
149-
149+
150150 /**
151151 * The getPropertyInfo method is intended to allow a generic GUI
152152 * tool to discover what properties it should prompt a human for
@@ -168,23 +168,23 @@ public class Driver implements java.sql.Driver
168168 public DriverPropertyInfo[] getPropertyInfo(String url, Properties info) throws SQLException
169169 {
170170 Properties p = parseURL(url,info);
171-
171+
172172 // naughty, but its best for speed. If anyone adds a property here, then
173173 // this _MUST_ be increased to accomodate them.
174174 DriverPropertyInfo d,dpi[] = new DriverPropertyInfo[0];
175175 //int i=0;
176-
176+
177177 //dpi[i++] = d = new DriverPropertyInfo("auth",p.getProperty("auth","default"));
178178 //d.description = "determines if password authentication is used";
179179 //d.choices = new String[4];
180180 //d.choices[0]="default";// Get value from org.postgresql.auth property, defaults to trust
181181 //d.choices[1]="trust";// No password authentication
182182 //d.choices[2]="password";// Password authentication
183183 //d.choices[3]="ident";// Ident (RFC 1413) protocol
184-
184+
185185 return dpi;
186186 }
187-
187+
188188 /**
189189 * Gets the drivers major version number
190190 *
@@ -194,7 +194,7 @@ public class Driver implements java.sql.Driver
194194 {
195195 return @MAJORVERSION@;
196196 }
197-
197+
198198 /**
199199 * Get the drivers minor version number
200200 *
@@ -204,21 +204,21 @@ public class Driver implements java.sql.Driver
204204 {
205205 return @MINORVERSION@;
206206 }
207-
207+
208208 /**
209209 * Returns the VERSION variable from Makefile.global
210210 */
211211 public static String getVersion()
212212 {
213213return "@VERSION@";
214214 }
215-
215+
216216 /**
217217 * Report whether the driver is a genuine JDBC compliant driver. A
218218 * driver may only report "true" here if it passes the JDBC compliance
219219 * tests, otherwise it is required to return false. JDBC compliance
220220 * requires full support for the JDBC API and full support for SQL 92
221- * Entry Level.
221+ * Entry Level.
222222 *
223223 * <p>For PostgreSQL, this is not yet possible, as we are not SQL92
224224 * compliant (yet).
@@ -227,11 +227,11 @@ public class Driver implements java.sql.Driver
227227 {
228228 return false;
229229 }
230-
230+
231231 private Properties props;
232-
232+
233233 static private String[] protocols = { "jdbc","postgresql" };
234-
234+
235235 /**
236236 * Constructs a new DriverURL, splitting the specified URL into its
237237 * component parts
@@ -246,17 +246,17 @@ public class Driver implements java.sql.Driver
246246 Properties urlProps = new Properties(defaults);
247247 String key = "";
248248 String value = "";
249-
249+
250250 StringTokenizer st = new StringTokenizer(url, ":/;=&?", true);
251251 for (int count = 0; (st.hasMoreTokens()); count++) {
252252 String token = st.nextToken();
253-
253+
254254 // PM June 29 1997
255255 // Added this, to help me understand how this works.
256256 // Unless you want each token to be processed, leave this commented out
257257 // but don't delete it.
258258 //DriverManager.println("wellFormedURL: state="+state+" count="+count+" token='"+token+"'");
259-
259+
260260 // PM Aug 2 1997 - Modified to allow multiple backends
261261 if (count <= 3) {
262262if ((count % 2) == 1 && token.equals(":"))
@@ -273,7 +273,7 @@ public class Driver implements java.sql.Driver
273273 }
274274 }
275275 }
276-
276+
277277 if(found == false)
278278 return null;
279279} else return null;
@@ -322,42 +322,42 @@ public class Driver implements java.sql.Driver
322322}
323323 }
324324 }
325-
325+
326326 // PM June 29 1997
327327 // This now outputs the properties only if we are logging
328328 // PM Sep 13 1999 Commented out, as it throws a Deprecation warning
329329 // when compiled under JDK1.2.
330330 //if(DriverManager.getLogStream() != null)
331331 // urlProps.list(DriverManager.getLogStream());
332-
332+
333333 return urlProps;
334-
334+
335335 }
336-
336+
337337 /**
338338 * @return the hostname portion of the URL
339339 */
340340 public String host()
341341 {
342342 return props.getProperty("PGHOST","localhost");
343343 }
344-
344+
345345 /**
346346 * @return the port number portion of the URL or -1 if no port was specified
347347 */
348348 public int port()
349349 {
350350 return Integer.parseInt(props.getProperty("PGPORT","5432"));
351351 }
352-
352+
353353 /**
354354 * @return the database name of the URL
355355 */
356356 public String database()
357357 {
358358 return props.getProperty("PGDBNAME");
359359 }
360-
360+
361361 /**
362362 * @return the value of any property specified in the URL or properties
363363 * passed to connect(), or null if not found.
@@ -366,7 +366,7 @@ public class Driver implements java.sql.Driver
366366 {
367367 return props.getProperty(name);
368368 }
369-
369+
370370 /**
371371 * This method was added in v6.5, and simply throws an SQLException
372372 * for an unimplemented method. I decided to do it this way while