We discovered a wrong result returned by the equality operator when comparing a date and a timestamp when the date operand is explicitly casted, but not the timestamp: import java.sql.Connection; ...
and ((split_part(partitionrangestart, '::', 1)::timestamp between to_timestamp(to_char(p_partition_start, 'YYYYMMDDHH24MISS'), 'YYYYMMDDHH24MISS') and to_timestamp(to ...