Add an extra cast for compatibility with Vertica 6