Consistent solutions in exchange economies: A characterization of the price mechanism