mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-02-17 19:30:00 +08:00
Implement DatabaseMetaData.getCatalogs()
This commit is contained in:
parent
2d9ee0fc55
commit
b054fb3b2d
@ -1825,14 +1825,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
|
||||
*/
|
||||
public java.sql.ResultSet getCatalogs() throws SQLException
|
||||
{
|
||||
// We don't use catalogs, so we simply return a single catalog name "".
|
||||
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);
|
||||
return connection.createStatement().executeQuery("select datname as TABLE_CAT from pg_database;");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1825,14 +1825,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
|
||||
*/
|
||||
public java.sql.ResultSet getCatalogs() throws SQLException
|
||||
{
|
||||
// We don't use catalogs, so we simply return a single catalog name "".
|
||||
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);
|
||||
return connection.createStatement().executeQuery("select datname as TABLE_CAT from pg_database;");
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user