15
15
/*
16
16
* This class provides information about the database as a whole.
17
17
*
18
- * $Id: DatabaseMetaData.java,v 1.48 2002/01/18 17:21:31 davec Exp $
18
+ * $Id: DatabaseMetaData.java,v 1.49 2002/02/22 02: 17:13 davec Exp $
19
19
*
20
20
* <p>Many of the methods here return lists of information in ResultSets. You
21
21
* can use the normal ResultSet methods such as getString and getInt to
@@ -2919,6 +2919,8 @@ public java.sql.ResultSet getIndexInfo(String catalog, String schema, String tab
2919
2919
{
2920
2920
columnOrdinals [o ++] = Integer .parseInt (stok .nextToken ());
2921
2921
}
2922
+
2923
+ java .sql .ResultSet columnNameRS = connection .ExecSQL ("select a.attname FROM pg_attribute a WHERE a.attrelid = " + r .getInt (9 ));
2922
2924
for (int i = 0 ; i < columnOrdinals .length ; i ++)
2923
2925
{
2924
2926
byte [] [] tuple = new byte [13 ] [];
@@ -2934,12 +2936,11 @@ public java.sql.ResultSet getIndexInfo(String catalog, String schema, String tab
2934
2936
Integer .toString (tableIndexHashed ).getBytes () :
2935
2937
Integer .toString (tableIndexOther ).getBytes ();
2936
2938
tuple [7 ] = Integer .toString (i + 1 ).getBytes ();
2937
- java .sql .ResultSet columnNameRS = connection .ExecSQL ("select a.attname FROM pg_attribute a WHERE (a.attnum = " + columnOrdinals [i ] + ") AND (a.attrelid = " + r .getInt (9 ) + ")" );
2938
2939
if (columnNameRS .next ())
2939
2940
tuple [8 ] = columnNameRS .getBytes (1 );
2940
2941
else
2941
2942
tuple [8 ] = "" .getBytes ();
2942
- tuple [ 8 ] = columnNameRS . getBytes ( 1 );
2943
+
2943
2944
tuple [9 ] = null ; // sort sequence ???
2944
2945
tuple [10 ] = r .getBytes (7 ); // inexact
2945
2946
tuple [11 ] = r .getBytes (8 );
0 commit comments