When a stranger comes to the house, our dogs come barking to the door. They then approach the visitor cautiously, sniffing a lot. Eventually, if the visitor stays, they will start to make mild overtures of friendship.
My brother was here visiting last week, and our dogs had never met him before. When I brought him home and we came into the kitchen, the dogs came barreling down the stairs and, without any sniffing or preliminaries, hurled themselves at him, going "Hello! Hello! Hooray! You're here! How great!"
I've heard it said that dogs recognize family members, whether from their scent or the way they behave or are treated, and I have experienced the phenomenon before. Heretofore unacquainted relatives arrive at the house, and the dogs are instantly comfortable with them. When my father came to stay with us years ago in our second-floor apartment, he arrived by taxi. On hearing the doorbell ring, I went downstairs to open the street door and let him in. Our dog, who had met him once a few years before, hurled herself down the stairs ahead of me in a state of great excitement and happiness. How did she know? What did she sense?
Now the horses .... I took said brother out to the field to see them. They were about 25 yards off when we arrived at the fence. They looked over at us and appeared to say something like, "Who is that strange man over there with June? He might be involved in the veterinary profession. He might possibly be a criminal. We'd better just stay over here." My brother decided we shouldn't bother them.
Just another example of the difference between species.