Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
742ca2e0
Commit
742ca2e0
authored
Dec 11, 2003
by
Dave Cramer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build number set to 300 to avoid conflict with 7.4 builds
threadsafe patch from Karl von Randow applied
parent
fc1dc0cd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
18 deletions
+8
-18
src/interfaces/jdbc/org/postgresql/Driver.java.in
src/interfaces/jdbc/org/postgresql/Driver.java.in
+8
-18
No files found.
src/interfaces/jdbc/org/postgresql/Driver.java.in
View file @
742ca2e0
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
*
Copyright
(
c
)
2003
,
PostgreSQL
Global
Development
Group
*
Copyright
(
c
)
2003
,
PostgreSQL
Global
Development
Group
*
*
*
IDENTIFICATION
*
IDENTIFICATION
*
$
PostgreSQL
:
pgsql
/
src
/
interfaces
/
jdbc
/
org
/
postgresql
/
Driver
.
java
.
in
,
v
1.
39
2003
/
12
/
10
18
:
30
:
44
davec
Exp
$
*
$
PostgreSQL
:
pgsql
/
src
/
interfaces
/
jdbc
/
org
/
postgresql
/
Driver
.
java
.
in
,
v
1.
40
2003
/
12
/
11
18
:
10
:
40
davec
Exp
$
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -123,6 +123,7 @@ public class Driver implements java.sql.Driver
...
@@ -123,6 +123,7 @@ public class Driver implements java.sql.Driver
*/
*/
public
java
.
sql
.
Connection
connect
(
String
url
,
Properties
info
)
throws
SQLException
public
java
.
sql
.
Connection
connect
(
String
url
,
Properties
info
)
throws
SQLException
{
{
Properties
props
;
if
((
props
=
parseURL
(
url
,
info
))
==
null
)
if
((
props
=
parseURL
(
url
,
info
))
==
null
)
{
{
if
(
Driver
.
logDebug
)
if
(
Driver
.
logDebug
)
...
@@ -135,7 +136,7 @@ public class Driver implements java.sql.Driver
...
@@ -135,7 +136,7 @@ public class Driver implements java.sql.Driver
Driver
.
debug
(
"connect "
+
url
);
Driver
.
debug
(
"connect "
+
url
);
@
JDBCCONNECTCLASS
@
con
=
(@
JDBCCONNECTCLASS
@)(
Class
.
forName
(
"@JDBCCONNECTCLASS@"
).
newInstance
());
@
JDBCCONNECTCLASS
@
con
=
(@
JDBCCONNECTCLASS
@)(
Class
.
forName
(
"@JDBCCONNECTCLASS@"
).
newInstance
());
con
.
openConnection
(
host
(
),
port
(),
props
,
database
(
),
url
,
this
);
con
.
openConnection
(
host
(
props
),
port
(
props
),
props
,
database
(
props
),
url
,
this
);
return
(
java
.
sql
.
Connection
)
con
;
return
(
java
.
sql
.
Connection
)
con
;
}
}
catch
(
ClassNotFoundException
ex
)
catch
(
ClassNotFoundException
ex
)
...
@@ -247,8 +248,6 @@ public class Driver implements java.sql.Driver
...
@@ -247,8 +248,6 @@ public class Driver implements java.sql.Driver
return
false
;
return
false
;
}
}
private
Properties
props
;
static
private
String
[]
protocols
=
{
"jdbc"
,
"postgresql"
};
static
private
String
[]
protocols
=
{
"jdbc"
,
"postgresql"
};
/*
/*
...
@@ -386,7 +385,7 @@ public class Driver implements java.sql.Driver
...
@@ -386,7 +385,7 @@ public class Driver implements java.sql.Driver
/*
/*
* @return the hostname portion of the URL
* @return the hostname portion of the URL
*/
*/
public String host()
public String host(
Properties props
)
{
{
return props.getProperty("PGHOST", "localhost");
return props.getProperty("PGHOST", "localhost");
}
}
...
@@ -394,7 +393,7 @@ public class Driver implements java.sql.Driver
...
@@ -394,7 +393,7 @@ public class Driver implements java.sql.Driver
/*
/*
* @return the port number portion of the URL or the default if no port was specified
* @return the port number portion of the URL or the default if no port was specified
*/
*/
public int port()
public int port(
Properties props
)
{
{
return Integer.parseInt(props.getProperty("PGPORT", "@DEF_PGPORT@"));
return Integer.parseInt(props.getProperty("PGPORT", "@DEF_PGPORT@"));
}
}
...
@@ -402,20 +401,11 @@ public class Driver implements java.sql.Driver
...
@@ -402,20 +401,11 @@ public class Driver implements java.sql.Driver
/*
/*
* @return the database name of the URL
* @return the database name of the URL
*/
*/
public String database()
public String database(
Properties props
)
{
{
return props.getProperty("PGDBNAME", "");
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
* This method was added in v6.5, and simply throws an SQLException
* for an unimplemented method. I decided to do it this way while
* for an unimplemented method. I decided to do it this way while
...
@@ -430,7 +420,7 @@ public class Driver implements java.sql.Driver
...
@@ -430,7 +420,7 @@ public class Driver implements java.sql.Driver
/**
/**
* used to turn logging on to a certain level, can be called
* used to turn logging on to a certain level, can be called
* by specifying fully qualified class ie org.postgresql.Driver.setLogLevel()
* by specifying fully qualified class ie org.postgresql.Driver.setLogLevel()
* @param
int
logLevel sets the level which logging will respond to
* @param logLevel sets the level which logging will respond to
* INFO being almost no messages
* INFO being almost no messages
* DEBUG most verbose
* DEBUG most verbose
*/
*/
...
@@ -508,6 +498,6 @@ public class Driver implements java.sql.Driver
...
@@ -508,6 +498,6 @@ public class Driver implements java.sql.Driver
//The build number should be incremented for every new build
//The build number should be incremented for every new build
private static int m_buildNumber =
211
;
private static int m_buildNumber =
300
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment