postgresql7.1 select msg, person__name(creation_user) as name from chat_msgs where room_id = :room_id and msg is not null order by msg_id