Child pet interaction is imperative to the development of the child and even the dog.
Interaction should be judged on a per pet basis, not all animals are as warm as others, some requiring certain off limit areas, others are anything goes. Some breeds are simply not suitable for children, parents should do their homework and find out if their current pet is suitable for children, that does not mean asking your neighbor.
A good pet will be extremely tolerant of a child, even some pets which are not so tolerant to others often can be a blessing (should be avoided however)
Animals are an Amazing thing, and again, all are different, and all situations and animals require a different approach.
Example. We had a very unapproachable Bull when I was a child he was flat out ornery. So there I was with the Parents and Gparents outside the coral, and being the usual three year old I slipped away quickly, crawled under the gate and in an instant, I was in with the Bull.
Rather than rushing me like most people, he stood camly and I guess I wandered up up and began petting him, this is about when the family realized what had happened and went into a near panic.
About that time I had grabbed his horns, he gently lifted me into the air, and set me back down just as gently.
Dad would come in the coral to retriever me but quickly retreated do to the threatening nature of the bull. Not afraid of the bull, but afraid of instigating the situation. I would end up waddling off on my own accord.
The story of the bull was exceptional in regards to how it acted, however in nature, most domestic animals will have a understanding of babies.