CREATE OR REPLACE FUNCTION public.fn_log_notification(p_event_type text, p_email text, p_session_id integer DEFAULT NULL::integer, p_partner_id bigint DEFAULT NULL::bigint)
 RETURNS void
 LANGUAGE sql
AS $function$
  INSERT INTO public.notifications_log (event_type, recipient_email, session_id, partner_id)
  VALUES (p_event_type, p_email, p_session_id, p_partner_id);
$function$
;
