In my country (NL) it is advised against that (though it used to be common practice), since a bit of water pipe running from your house might have been replaced with a plastic one and the metal bit still sticking out into your house might not have the proper ground resistance to function as a proper earth wire.
The US used to allow metal pipes to be counted as a ground connection, but not anyway. The US requires metal pipes be connected to ground, but that is not the same as the neutral to ground connection.
Metal touching the ground does not guarantee a proper earth. The resistance might be to high to function properly under all circumstances a ground is needed.