* retrieves those without a schema @param table a table name @return
	 * ResultSet each row is a primary key column description
	 */
	public java.sql.ResultSet getPrimaryKeys(String catalog, String schema,
		String table) throws SQLException
	{
		String from;
		String where = "";
		String select = "SELECT NULL AS TABLE_CAT, n.nspname AS TABLE_SCHEM, ";
			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 + " ct.relname AS TABLE_NAME, "
			+ " a.attname AS COLUMN_NAME, " + " a.attnum::int2 AS KEY_SEQ, "
			+ " ci.relname AS PK_NAME " + from
			+ " WHERE ct.oid=i.indrelid AND ci.oid=i.indexrelid "
			+ " AND a.attrelid=ci.oid AND i.indisprimary ";
		if(table != null && !"".equals(table))
		{
			sql += " AND ct.relname = '" + escapeQuotes(table) + "' ";
		}
		sql += where + " ORDER BY table_name, pk_name, key_seq";

        return createMetaDataStatement().executeQuery(sql);
	}