FIFYI wasn't there, and I doubt any other commenters were either, but I'm not sure a gun would have been the best solution here. A dog attack is a fast-moving thing, and--teeth being a melee weapon, not a standoff weapon--necessarily occurs in very close proximity to the victim. Or a dozen victims.
How many here would say they're absolutely comfortable with "someone else's" marksmanship to be able to hit a dog under those circumstances and not hit a kid accidentally? Oh, and don't forget that your defensive ammo is designed to achieve a certain degree of penetration against a human, and a dog--even a pit bull--is going to be smaller, so you have to not only be accurate, but guarantee no pass-through.
Who wants to be the one explaining to the kid's parents how he got that bullet wound?