Yes, I understand what you say, but as I said when we derive the Pressure-depth relation, we consider the weight of the water to find out the pressure. But if we replace the water by an object with same mass, my question is, why we can say that the pressure exerted by the water is still the same?