Sex during pregnancy

I'm not pregnant nor do I plan to be any time soon, but is there ever a wrong time to have sex during pregnancy? Or a certain trimester that you shouldn't?