* SCOPE @param nullable include columns that are nullable? @return
	 * ResultSet each row is a column description
	 */
	// Implementation note: This is required for Borland's JBuilder to work
	public java.sql.ResultSet getBestRowIdentifier(String catalog,
		String schema, String table, int scope, boolean nullable)
	throws SQLException
	{
		ResultSetField f[] = new ResultSetField[8];
		ArrayList v = new ArrayList(); // The new ResultSet tuple stuff

		f[0] = new ResultSetField("SCOPE", TypeOid.INT2, 2);
		f[1] = new ResultSetField("COLUMN_NAME", TypeOid.VARCHAR,
			getMaxNameLength());
		f[2] = new ResultSetField("DATA_TYPE", TypeOid.INT2, 2);
		f[3] = new ResultSetField("TYPE_NAME", TypeOid.VARCHAR,
			getMaxNameLength());
		f[4] = new ResultSetField("COLUMN_SIZE", TypeOid.INT4, 4);
		f[5] = new ResultSetField("BUFFER_LENGTH", TypeOid.INT4, 4);
		f[6] = new ResultSetField("DECIMAL_DIGITS", TypeOid.INT2, 2);
		f[7] = new ResultSetField("PSEUDO_COLUMN", TypeOid.INT2, 2);

		/*
		 * At the moment this simply returns a table's primary key, if there is
		 * one. I believe other unique indexes, ctid, and oid should also be
		 * considered. -KJ
		 */

		String where = "";
		String from = " FROM pg_catalog.pg_namespace n, pg_catalog.pg_class ct, pg_catalog.pg_class ci, pg_catalog.pg_attribute a, pg_catalog.pg_index i ";
			where = " AND ct.relnamespace = n.oid "
                  + " AND " + resolveSchemaCondition(
                                  "n.nspname", schema);
		String sql = "SELECT a.attname, a.atttypid as atttypid " + from
			+ " WHERE ct.oid=i.indrelid AND ci.oid=i.indexrelid "
			+ " AND a.attrelid=ci.oid AND i.indisprimary "
			+ " AND ct.relname = '" + escapeQuotes(table) + "' " + where
			+ " ORDER BY a.attnum ";

		ResultSet rs = m_connection.createStatement().executeQuery(sql);
		while(rs.next())
		{
			Object[] tuple = new Object[8];
			Oid columnTypeOid = (Oid)rs.getObject("atttypid");
			tuple[0] = new Short((short)scope);
			tuple[1] = rs.getString("attname");
			tuple[2] = new Short((short)m_connection.getSQLType(columnTypeOid));
			tuple[3] = m_connection.getPGType(columnTypeOid);
			tuple[4] = null;
			tuple[5] = null;
			tuple[6] = null;
			tuple[7] = new Short((short)java.sql.DatabaseMetaData.bestRowNotPseudo);
			v.add(tuple);
		}

		return createSyntheticResultSet(f, v);
	}