Def. depends on the dog - my lab has grown up with the guineas around him and is now quite happy with them being part of our pack - he's not interested in them, but I still wouldn't leave him alone with them if they were loose (although pretty sure he wouldn't do anything, it's just not worth the risk)
BUT my terrier - well, terriers were bred to hunt small squeaky things and he just can't help himself - he has got better, with a lot of work and reminding him constantly that they are NOT food, but if they make sudden movements his instinct takes over and it's not fair on him. I just don't let him near the pigs. If they're enclosed safely, e.g in their runs, he is allowed in the garden but only if I'm there. He's not a nasty dog, he's just doing what comes naturally. I have known guinea pigs be killed by terriers and in my opinion no dog is 100% with pigs - or with children! No matter how nice they are usually.
Sophie
x