/**
* This class provides information about the database as a whole.
*
- * $Id: DatabaseMetaData.java,v 1.33 2001/09/29 03:08:01 momjian Exp $
+ * $Id: DatabaseMetaData.java,v 1.34 2001/10/24 04:31:48 barry Exp $
*
* <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
"a.amname, " +
"x.indkey, " +
"c.reltuples, " +
- "c.relpages " +
+ "c.relpages, " +
+ "x.indexrelid " +
"FROM pg_index x, pg_class c, pg_class i, pg_am a " +
"WHERE ((c.relname = '" + tableName.toLowerCase() + "') " +
" AND (c.oid = x.indrelid) " +
Integer.toString(tableIndexHashed).getBytes() :
Integer.toString(tableIndexOther).getBytes();
tuple[7] = Integer.toString(i + 1).getBytes();
- java.sql.ResultSet columnNameRS = connection.ExecSQL("select a.attname FROM pg_attribute a, pg_class c WHERE (a.attnum = " + columnOrdinals[i] + ") AND (a.attrelid = " + r.getInt(8) + ")");
+ java.sql.ResultSet columnNameRS = connection.ExecSQL("select a.attname FROM pg_attribute a WHERE (a.attnum = " + columnOrdinals[i] + ") AND (a.attrelid = " + r.getInt(9) + ")");
columnNameRS.next();
tuple[8] = columnNameRS.getBytes(1);
tuple[9] = null; // sort sequence ???
/**
* This class provides information about the database as a whole.
*
- * $Id: DatabaseMetaData.java,v 1.37 2001/09/29 03:08:01 momjian Exp $
+ * $Id: DatabaseMetaData.java,v 1.38 2001/10/24 04:31:50 barry Exp $
*
* <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
"a.amname, " +
"x.indkey, " +
"c.reltuples, " +
- "c.relpages " +
+ "c.relpages, " +
+ "x.indexrelid " +
"FROM pg_index x, pg_class c, pg_class i, pg_am a " +
"WHERE ((c.relname = '" + tableName.toLowerCase() + "') " +
" AND (c.oid = x.indrelid) " +
Integer.toString(tableIndexHashed).getBytes() :
Integer.toString(tableIndexOther).getBytes();
tuple[7] = Integer.toString(i + 1).getBytes();
- java.sql.ResultSet columnNameRS = connection.ExecSQL("select a.attname FROM pg_attribute a, pg_class c WHERE (a.attnum = " + columnOrdinals[i] + ") AND (a.attrelid = " + r.getInt(8) + ")");
+ java.sql.ResultSet columnNameRS = connection.ExecSQL("select a.attname FROM pg_attribute a WHERE (a.attnum = " + columnOrdinals[i] + ") AND (a.attrelid = " + r.getInt(9) + ")");
columnNameRS.next();
tuple[8] = columnNameRS.getBytes(1);
tuple[9] = null; // sort sequence ???