Rigidity, functional equations and the Calogero-Moser model