A consistent study of metallicity evolution at 0.8 < z < 2.6