postgresql 7.2 update dotlrn_member_emails set enabled_p = case when enabled_p then false else true end where community_id = :community_id and type = 'on join'