  We study the solvability of the equation for the smooth function F, H=-k F g,
on a geodesically complete pseudo-Riemannian manifold (M,g), H being the
covariant Hessian of F. A similar equation was considered by Obata and Gallot
in the Riemannian case for positive values of the constant k; the result was
that the manifold must be the canonical sphere.
  In this generalized setting we obtain a range of possibilities, depending on
the sign of k, the signature of the metric and the value of a certain first
integral of the equation: the manifold is shown to be of constant sectional
curvature or a warped product with suitable factors depending on the cases.
