patch from Mitchel Friedman to fix getTables
This commit is contained in:
parent
925d60ee53
commit
7aa6270fc7
@ -13,7 +13,7 @@ import org.postgresql.util.PSQLException;
|
|||||||
/*
|
/*
|
||||||
* This class provides information about the database as a whole.
|
* This class provides information about the database as a whole.
|
||||||
*
|
*
|
||||||
* $Id: DatabaseMetaData.java,v 1.43 2002/03/05 02:14:06 davec Exp $
|
* $Id: DatabaseMetaData.java,v 1.44 2002/03/05 03:02:47 davec Exp $
|
||||||
*
|
*
|
||||||
* <p>Many of the methods here return lists of information in ResultSets. You
|
* <p>Many of the methods here return lists of information in ResultSets. You
|
||||||
* can use the normal ResultSet methods such as getString and getInt to
|
* can use the normal ResultSet methods such as getString and getInt to
|
||||||
@ -1732,8 +1732,15 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
|
|||||||
switch (r.getBytes(3)[0])
|
switch (r.getBytes(3)[0])
|
||||||
{
|
{
|
||||||
case (byte) 'r':
|
case (byte) 'r':
|
||||||
relKind = "TABLE";
|
if ( r.getString(1).startsWith("pg_") )
|
||||||
break;
|
{
|
||||||
|
relKind = "SYSTEM TABLE";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
relKind = "TABLE";
|
||||||
|
}
|
||||||
|
break;
|
||||||
case (byte) 'i':
|
case (byte) 'i':
|
||||||
relKind = "INDEX";
|
relKind = "INDEX";
|
||||||
break;
|
break;
|
||||||
|
@ -15,7 +15,7 @@ import org.postgresql.util.PSQLException;
|
|||||||
/*
|
/*
|
||||||
* This class provides information about the database as a whole.
|
* This class provides information about the database as a whole.
|
||||||
*
|
*
|
||||||
* $Id: DatabaseMetaData.java,v 1.50 2002/03/05 02:14:08 davec Exp $
|
* $Id: DatabaseMetaData.java,v 1.51 2002/03/05 03:02:52 davec Exp $
|
||||||
*
|
*
|
||||||
* <p>Many of the methods here return lists of information in ResultSets. You
|
* <p>Many of the methods here return lists of information in ResultSets. You
|
||||||
* can use the normal ResultSet methods such as getString and getInt to
|
* can use the normal ResultSet methods such as getString and getInt to
|
||||||
@ -1832,7 +1832,14 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
|
|||||||
switch (r.getBytes(3)[0])
|
switch (r.getBytes(3)[0])
|
||||||
{
|
{
|
||||||
case (byte) 'r':
|
case (byte) 'r':
|
||||||
relKind = "TABLE";
|
if ( r.getString(1).startsWith("pg_") )
|
||||||
|
{
|
||||||
|
relKind = "SYSTEM TABLE";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
relKind = "TABLE";
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case (byte) 'i':
|
case (byte) 'i':
|
||||||
relKind = "INDEX";
|
relKind = "INDEX";
|
||||||
|
Loading…
Reference in New Issue
Block a user