I agree with the pps that say it depends on the child, I also think it depends on the age of the child and the parents personality. I am not at all comfortable spanking a baby under 2 or a child over 10 depending on maturity. I also think it is dependant on the child's ability to understand and learn from it without too much resentment as well as the child's makeup.
My difficult child Major's behavior is mostly the result of anxiety...I can't spank that out of him, now my 21 yo that has ADHD and mild ODD, a spanking gave him something to FEAR that let him show greater self control...but he would internalize it as my personal dislike of HIM. I used it seldom and usually had a talk after about why I did it and that I loved him very much.
Now, am I guilty of spanking when it wasn't a great idea, oh yea. Would I want a school to spank my kid...No, if I felt it was needed, I would do it at home, I wouldn't want the humiliation of it to effect my kid and I am pretty sure I wouldn't agree with the school more often then not.