PostgreSQL fails with failed to find conversion function from
unknown to text. PostgreSQL won't detect the type of object_type.
Most likely because it's used in a CASE statement and provided by a
subquery:
select case when s.object_type = 'service' then 1 else 0 end from
(select ('service') as object_type) as s;
This commit just removes object_type from the CASE statements because we
don't need them anyway. Recently we've changed the event grid query to
only select hosts or services and not both.