Simplify coalesce
-select p_personid, p_firstname, p_lastname, m_messageid, COALESCE(m_ps_imagefile,'')||COALESCE(m_content,''), m_creationdate
+select p_personid, p_firstname, p_lastname, m_messageid, COALESCE(m_ps_imagefile, m_content, ''), m_creationdate
from person, message, knows
where
p_personid = m_creatorid and
