Added VARCHAR cast for POstgresql support