The paper examines various exact solutions to Einstein's field equations to investigate a recent criterion for static and spherically symmetric solutions in hydrostatic equilibrium. The criterion, derived from the exterior Schwarzschild solution, states that the compaction parameter of a homogeneous density distribution should be greater than or equal to the compaction parameter of any static and spherical solution. The study finds that this criterion is satisfied only by regular solutions with vanishing surface density and pressure, and singular solutions with non-vanishing surface density. Regular solutions with finite non-zero surface density do not fulfill this criterion. The paper concludes that the exterior Schwarzschild solution provides necessary conditions for the types of density distributions inside a mass to be compatible with general relativity. The criterion is useful for constructing core-envelope models of stellar objects and testing equations of state for dense nuclear matter and relativistic stellar structures.The paper examines various exact solutions to Einstein's field equations to investigate a recent criterion for static and spherically symmetric solutions in hydrostatic equilibrium. The criterion, derived from the exterior Schwarzschild solution, states that the compaction parameter of a homogeneous density distribution should be greater than or equal to the compaction parameter of any static and spherical solution. The study finds that this criterion is satisfied only by regular solutions with vanishing surface density and pressure, and singular solutions with non-vanishing surface density. Regular solutions with finite non-zero surface density do not fulfill this criterion. The paper concludes that the exterior Schwarzschild solution provides necessary conditions for the types of density distributions inside a mass to be compatible with general relativity. The criterion is useful for constructing core-envelope models of stellar objects and testing equations of state for dense nuclear matter and relativistic stellar structures.