Index: src/interfaces/jdbc/org/postgresql/Driver.java.in =================================================================== RCS file: /projects/cvsroot/pgsql-server/src/interfaces/jdbc/org/postgresql/Driver.java.in,v retrieving revision 1.37 diff -c -r1.37 Driver.java.in *** src/interfaces/jdbc/org/postgresql/Driver.java.in 3 Nov 2003 15:22:06 -0000 1.37 --- src/interfaces/jdbc/org/postgresql/Driver.java.in 16 Nov 2003 01:12:20 -0000 *************** *** 123,128 **** --- 123,129 ---- */ public java.sql.Connection connect(String url, Properties info) throws SQLException { + Properties props; if ((props = parseURL(url, info)) == null) { if (Driver.logDebug) *************** *** 135,141 **** Driver.debug("connect " + url); @JDBCCONNECTCLASS@ con = (@JDBCCONNECTCLASS@)(Class.forName("@JDBCCONNECTCLASS@").newInstance()); ! con.openConnection (host(), port(), props, database(), url, this); return (java.sql.Connection)con; } catch (ClassNotFoundException ex) --- 136,142 ---- Driver.debug("connect " + url); @JDBCCONNECTCLASS@ con = (@JDBCCONNECTCLASS@)(Class.forName("@JDBCCONNECTCLASS@").newInstance()); ! con.openConnection (host(props), port(props), props, database(props), url, this); return (java.sql.Connection)con; } catch (ClassNotFoundException ex) *************** *** 247,254 **** return false; } - private Properties props; - static private String[] protocols = { "jdbc", "postgresql" }; /* --- 248,253 ---- *************** *** 386,392 **** /* * @return the hostname portion of the URL */ ! public String host() { return props.getProperty("PGHOST", "localhost"); } --- 385,391 ---- /* * @return the hostname portion of the URL */ ! public String host(Properties props) { return props.getProperty("PGHOST", "localhost"); } *************** *** 394,400 **** /* * @return the port number portion of the URL or the default if no port was specified */ ! public int port() { return Integer.parseInt(props.getProperty("PGPORT", "@DEF_PGPORT@")); } --- 393,399 ---- /* * @return the port number portion of the URL or the default if no port was specified */ ! public int port(Properties props) { return Integer.parseInt(props.getProperty("PGPORT", "@DEF_PGPORT@")); } *************** *** 402,422 **** /* * @return the database name of the URL */ ! public String database() { return props.getProperty("PGDBNAME", ""); } /* - * @return the value of any property specified in the URL or properties - * passed to connect(), or null if not found. - */ - public String property(String name) - { - return props.getProperty(name); - } - - /* * This method was added in v6.5, and simply throws an SQLException * for an unimplemented method. I decided to do it this way while * implementing the JDBC2 extensions to JDBC, as it should help keep the --- 401,412 ---- /* * @return the database name of the URL */ ! public String database(Properties props) { return props.getProperty("PGDBNAME", ""); } /* * This method was added in v6.5, and simply throws an SQLException * for an unimplemented method. I decided to do it this way while * implementing the JDBC2 extensions to JDBC, as it should help keep the *************** *** 430,436 **** /** * used to turn logging on to a certain level, can be called * by specifying fully qualified class ie org.postgresql.Driver.setLogLevel() ! * @param int logLevel sets the level which logging will respond to * INFO being almost no messages * DEBUG most verbose */ --- 420,426 ---- /** * used to turn logging on to a certain level, can be called * by specifying fully qualified class ie org.postgresql.Driver.setLogLevel() ! * @param logLevel sets the level which logging will respond to * INFO being almost no messages * DEBUG most verbose */