Set SECURITY DEFINER for List_Messages() as it would otherwise need table access