Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 742ca2e

Browse files
author
Dave Cramer
committed
build number set to 300 to avoid conflict with 7.4 builds
threadsafe patch from Karl von Randow applied
1 parent fc1dc0c commit 742ca2e

File tree

1 file changed

+8
-18
lines changed

1 file changed

+8
-18
lines changed

src/interfaces/jdbc/org/postgresql/Driver.java.in

+8-18
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Copyright (c) 2003, PostgreSQL Global Development Group
77
*
88
* IDENTIFICATION
9-
* $PostgreSQL: pgsql/src/interfaces/jdbc/org/postgresql/Driver.java.in,v 1.39 2003/12/10 18:30:44 davec Exp $
9+
* $PostgreSQL: pgsql/src/interfaces/jdbc/org/postgresql/Driver.java.in,v 1.40 2003/12/11 18:10:40 davec Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -123,6 +123,7 @@ public class Driver implements java.sql.Driver
123123
*/
124124
public java.sql.Connection connect(String url, Properties info) throws SQLException
125125
{
126+
Properties props;
126127
if ((props = parseURL(url, info)) == null)
127128
{
128129
if (Driver.logDebug)
@@ -135,7 +136,7 @@ public class Driver implements java.sql.Driver
135136
Driver.debug("connect " + url);
136137

137138
@JDBCCONNECTCLASS@ con = (@JDBCCONNECTCLASS@)(Class.forName("@JDBCCONNECTCLASS@").newInstance());
138-
con.openConnection (host(), port(), props, database(), url, this);
139+
con.openConnection (host(props), port(props), props, database(props), url, this);
139140
return (java.sql.Connection)con;
140141
}
141142
catch (ClassNotFoundException ex)
@@ -247,8 +248,6 @@ public class Driver implements java.sql.Driver
247248
return false;
248249
}
249250

250-
private Properties props;
251-
252251
static private String[] protocols = { "jdbc", "postgresql" };
253252

254253
/*
@@ -386,36 +385,27 @@ public class Driver implements java.sql.Driver
386385
/*
387386
* @return the hostname portion of the URL
388387
*/
389-
public String host()
388+
public String host(Properties props)
390389
{
391390
return props.getProperty("PGHOST", "localhost");
392391
}
393392

394393
/*
395394
* @return the port number portion of the URL or the default if no port was specified
396395
*/
397-
public int port()
396+
public int port(Properties props)
398397
{
399398
return Integer.parseInt(props.getProperty("PGPORT", "@DEF_PGPORT@"));
400399
}
401400

402401
/*
403402
* @return the database name of the URL
404403
*/
405-
public String database()
404+
public String database(Properties props)
406405
{
407406
return props.getProperty("PGDBNAME", "");
408407
}
409408

410-
/*
411-
* @return the value of any property specified in the URL or properties
412-
* passed to connect(), or null if not found.
413-
*/
414-
public String property(String name)
415-
{
416-
return props.getProperty(name);
417-
}
418-
419409
/*
420410
* This method was added in v6.5, and simply throws an SQLException
421411
* for an unimplemented method. I decided to do it this way while
@@ -430,7 +420,7 @@ public class Driver implements java.sql.Driver
430420
/**
431421
* used to turn logging on to a certain level, can be called
432422
* by specifying fully qualified class ie org.postgresql.Driver.setLogLevel()
433-
* @param int logLevel sets the level which logging will respond to
423+
* @param logLevel sets the level which logging will respond to
434424
* INFO being almost no messages
435425
* DEBUG most verbose
436426
*/
@@ -508,6 +498,6 @@ public class Driver implements java.sql.Driver
508498

509499

510500
//The build number should be incremented for every new build
511-
private static int m_buildNumber = 211;
501+
private static int m_buildNumber = 300;
512502

513503
}

0 commit comments

Comments
 (0)