postgresql7.1 select acs_message__first_ancestor(:message_id) as ancestor_id