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
b054fb3b
Commit
b054fb3b
authored
Jul 08, 2001
by
Peter Eisentraut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement DatabaseMetaData.getCatalogs()
parent
2d9ee0fc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
16 deletions
+2
-16
src/interfaces/jdbc/org/postgresql/jdbc1/DatabaseMetaData.java
...nterfaces/jdbc/org/postgresql/jdbc1/DatabaseMetaData.java
+1
-8
src/interfaces/jdbc/org/postgresql/jdbc2/DatabaseMetaData.java
...nterfaces/jdbc/org/postgresql/jdbc2/DatabaseMetaData.java
+1
-8
No files found.
src/interfaces/jdbc/org/postgresql/jdbc1/DatabaseMetaData.java
View file @
b054fb3b
...
@@ -1825,14 +1825,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
...
@@ -1825,14 +1825,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
*/
*/
public
java
.
sql
.
ResultSet
getCatalogs
()
throws
SQLException
public
java
.
sql
.
ResultSet
getCatalogs
()
throws
SQLException
{
{
// We don't use catalogs, so we simply return a single catalog name "".
return
connection
.
createStatement
().
executeQuery
(
"select datname as TABLE_CAT from pg_database;"
);
Field
f
[]
=
new
Field
[
1
];
Vector
v
=
new
Vector
();
byte
[][]
tuple
=
new
byte
[
1
][
0
];
f
[
0
]
=
new
Field
(
connection
,
"TABLE_CAT"
,
iVarcharOid
,
32
);
tuple
[
0
]
=
""
.
getBytes
();
v
.
addElement
(
tuple
);
return
new
ResultSet
(
connection
,
f
,
v
,
"OK"
,
1
);
}
}
/**
/**
...
...
src/interfaces/jdbc/org/postgresql/jdbc2/DatabaseMetaData.java
View file @
b054fb3b
...
@@ -1825,14 +1825,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
...
@@ -1825,14 +1825,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
*/
*/
public
java
.
sql
.
ResultSet
getCatalogs
()
throws
SQLException
public
java
.
sql
.
ResultSet
getCatalogs
()
throws
SQLException
{
{
// We don't use catalogs, so we simply return a single catalog name "".
return
connection
.
createStatement
().
executeQuery
(
"select datname as TABLE_CAT from pg_database;"
);
Field
f
[]
=
new
Field
[
1
];
Vector
v
=
new
Vector
();
byte
[][]
tuple
=
new
byte
[
1
][
0
];
f
[
0
]
=
new
Field
(
connection
,
"TABLE_CAT"
,
iVarcharOid
,
32
);
tuple
[
0
]
=
""
.
getBytes
();
v
.
addElement
(
tuple
);
return
new
ResultSet
(
connection
,
f
,
v
,
"OK"
,
1
);
}
}
/**
/**
...
...
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