My Macbook Pro charger (purchased in the US) comes with two different plug attachments, one that fits directly into the body of the charger and one with an extension cord. For some reason, the short attachment has only two prongs, while the long one has an additional ground pin. What is the function of the ground pin on the long attachment? Is it really necessary?
The third pin is a ground pin. It is required in some countries for devices with a metal surface to prevent shocks in case of a short-circuit. Since they also delivered a plug with only two pins to you, in your country it seems to be ok to use without grounding. If you want to be absolutely on the safe side, use the three pin cable.