The chemical reactions and pathways involving a pyridine-containing compound, i.e. any compound that contains pyridine or a formal derivative thereof.