* false, return indices regardless of whether unique or not @param
	 * approximate when true, result is allowed to reflect approximate or out of
	 * data values; when false, results are requested to be accurate @return
	 * ResultSet each row is an index column description
	 */
	// Implementation note: This is required for Borland's JBuilder to work
	public java.sql.ResultSet getIndexInfo(String catalog, String schema,
		String tableName, boolean unique, boolean approximate)
	throws SQLException
	{
		String select = "SELECT NULL AS TABLE_CAT, n.nspname AS TABLE_SCHEM, ";
		String from = " FROM pg_catalog.pg_namespace n, pg_catalog.pg_class ct, pg_catalog.pg_class ci, pg_catalog.pg_index i, pg_catalog.pg_attribute a, pg_catalog.pg_am am ";
		String where =
            " AND n.oid = ct.relnamespace " +
            " AND " + resolveSchemaCondition("n.nspname", schema);

		String sql = select
			+ " ct.relname AS TABLE_NAME, NOT i.indisunique AS NON_UNIQUE, NULL AS INDEX_QUALIFIER, ci.relname AS INDEX_NAME, "
			+ " CASE i.indisclustered "
			+ " WHEN true THEN "
			+ java.sql.DatabaseMetaData.tableIndexClustered
			+ " ELSE CASE am.amname "
			+ " WHEN 'hash' THEN "
			+ java.sql.DatabaseMetaData.tableIndexHashed
			+ " ELSE "
			+ java.sql.DatabaseMetaData.tableIndexOther
			+ " END "
			+ " END::int2 AS TYPE, "
			+ " a.attnum::int2 AS ORDINAL_POSITION, "
			+ " a.attname AS COLUMN_NAME, "
			+ " NULL AS ASC_OR_DESC, "
			+ " ci.reltuples AS CARDINALITY, "
			+ " ci.relpages AS PAGES, "
			+ " NULL AS FILTER_CONDITION "
			+ from
			+ " WHERE ct.oid=i.indrelid AND ci.oid=i.indexrelid AND a.attrelid=ci.oid AND ci.relam=am.oid "
			+ where + " AND ct.relname = '" + escapeQuotes(tableName) + "' ";

		if(unique)
		{
			sql += " AND i.indisunique ";
		}
		sql += " ORDER BY NON_UNIQUE, TYPE, INDEX_NAME, ORDINAL_POSITION ";
		return createMetaDataStatement().executeQuery(sql);
	}