If you are a pig farmer, it doesn't matter where you put it. Your own pig is ok.
If it's a pet pig, it's ok,
If it's someone else's, you don't need to take preventive measures, which is not good from the health point of view.
If you follow Feng Shui, I really don't know. You can ask your neighbors or the elderly and give you some advice.