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
d5d23dde
Commit
d5d23dde
authored
Nov 25, 2000
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow jdbc to return proper server version number
Anders Bengtsson
parent
9d5098ca
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
16 deletions
+16
-16
src/interfaces/jdbc/org/postgresql/jdbc1/DatabaseMetaData.java
...nterfaces/jdbc/org/postgresql/jdbc1/DatabaseMetaData.java
+8
-8
src/interfaces/jdbc/org/postgresql/jdbc2/DatabaseMetaData.java
...nterfaces/jdbc/org/postgresql/jdbc2/DatabaseMetaData.java
+8
-8
No files found.
src/interfaces/jdbc/org/postgresql/jdbc1/DatabaseMetaData.java
View file @
d5d23dde
...
@@ -167,19 +167,19 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
...
@@ -167,19 +167,19 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
/**
/**
* What is the version of this database product.
* What is the version of this database product.
*
*
* <p>Note that PostgreSQL 6.3 has a system catalog called pg_version -
* however, select * from pg_version on any database retrieves
* no rows.
*
* <p>For now, we will return the version 6.3 (in the hope that we change
* this driver as often as we change the database)
*
* @return the database version
* @return the database version
* @exception SQLException if a database access error occurs
* @exception SQLException if a database access error occurs
*/
*/
public
String
getDatabaseProductVersion
()
throws
SQLException
public
String
getDatabaseProductVersion
()
throws
SQLException
{
{
return
connection
.
this_driver
.
getVersion
();
java
.
sql
.
ResultSet
resultSet
=
connection
.
ExecSQL
(
"select version()"
);
resultSet
.
next
();
StringTokenizer
versionParts
=
new
StringTokenizer
(
resultSet
.
getString
(
1
));
versionParts
.
nextToken
();
/* "PostgreSQL" */
String
versionNumber
=
versionParts
.
nextToken
();
/* "X.Y.Z" */
return
versionNumber
;
}
}
/**
/**
...
...
src/interfaces/jdbc/org/postgresql/jdbc2/DatabaseMetaData.java
View file @
d5d23dde
...
@@ -167,19 +167,19 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
...
@@ -167,19 +167,19 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
/**
/**
* What is the version of this database product.
* What is the version of this database product.
*
*
* <p>Note that PostgreSQL 6.3 has a system catalog called pg_version -
* however, select * from pg_version on any database retrieves
* no rows.
*
* <p>For now, we will return the version 6.3 (in the hope that we change
* this driver as often as we change the database)
*
* @return the database version
* @return the database version
* @exception SQLException if a database access error occurs
* @exception SQLException if a database access error occurs
*/
*/
public
String
getDatabaseProductVersion
()
throws
SQLException
public
String
getDatabaseProductVersion
()
throws
SQLException
{
{
return
connection
.
this_driver
.
getVersion
();
java
.
sql
.
ResultSet
resultSet
=
connection
.
ExecSQL
(
"select version()"
);
resultSet
.
next
();
StringTokenizer
versionParts
=
new
StringTokenizer
(
resultSet
.
getString
(
1
));
versionParts
.
nextToken
();
/* "PostgreSQL" */
String
versionNumber
=
versionParts
.
nextToken
();
/* "X.Y.Z" */
return
versionNumber
;
}
}
/**
/**
...
...
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