In case of an incompressible liquid, the density is independent of the variations in pressure and always remains constant. But it is not so in case of a compressible liquid. Thus, the given equation will not be strictly valid for a compressible liquid.