postgresql7.1 delete from bboard_forum_message_map map, acs_messages m, acs_messages m2 where map.message_id = m.message_id and m.tree_sortkey between m2.tree_sortkey and tree_right(m2.tree_sortkey)