Lyserg and blah already went in-depth about it. All I can really add is that it is referred to as "urinary retention". Along side opiates, just opiate induced urinary retention.
You'll hear this as a side effect to many drugs - usually opioids and opiates though. It can also be a symptom/problem of it's own, and as such, there have been incidences of trouble.
There have been cases of Bluelighters not being able to pee on opiates, so they decide to force it out by drinking a shitload of water. Plan backfires, and these people have ended up going to the hospital because of urinary retention on opiates and having just chugged a half gallon of water.
When you can't pee and have alot of water in your bladder, you can go through some serious health complications.
So while under normal conditions there are things you can do - fiber, diuretics, et cetera, when under the influence of opiates, please do not try to force out the piss by drinking lots. Opiates will prevent it from coming it, you can't really do anything about it, and if you don't sober up before trouble comes up from not peeing, you may need a ride in the white bus.