PurposeWe analyzed temporal trends, demographic and clinical characteristics and hospital mortality rates of postoperative pneumonia among type 2 diabetes mellitus (T2DM) patients in Spain from 2001 to 2015. We also compared the incidence, comorbidities and mortality between patients with and without T2DM suffering from postoperative pneumonia. Finally, we analyzed the factors involved in the prediction of in-hospital mortality among patients suffering postoperative pneumonia.MethodsWe used the Spanish National Hospital Discharge Database for the period 2001–2015. We analyzed patients aged 40 years or over who had been hospitalized for a surgical procedure and suffered pneumonia or ventilator-associated pneumonia during their hospital admission. We compared patients with and without T2DM. The main outcome measures were the type of surgical procedure, the presence of a comorbidity, the type of isolated pathogens, admission to the emergency room (ER) and in-hospital mortality (IHM).ResultsWe selected 117,665 hospitalized patients who suffered postoperative pneumonia (16.9% with T2DM). After multivariable adjustment, T2DM patients had a 21% higher incidence of postoperative pneumonia than nondiabetic patients (IRR 1.21, 95% CI 1.03–1.42). The IHM was approximately 31% in both groups. Predictors of IHM included age, the presence of comorbidities, treatment with a pleural drainage tube, dialysis, blood transfusion, mechanical ventilation and admission to the ER. From 2001 to 2015, the IHM decreased significantly in both populations. Suffering from T2DM was not a predictor of IHM (OR 0.99, 95% CI 0.96–1.03) in our investigation.ConclusionsT2DM patients have a higher incidence of postoperative pneumonia than those without this disease. The IHM decreased from 2001 to 2015, regardless of T2DM status. T2DM did not predict a higher IHM after suffering from postoperative pneumonia.