Sorry about the bold there.
Same post without the problem:
Three, not mutually exclusive, ways you should approach this problem
(1) Minimize the occurrence of the problem by drinking early and then stopping. Forget where I read this (Pfitzinger's web site?) but it's worked for me. Presuming you wake up about 2:30 - 3:00 hour before the marathon you should drink about a quart (approximately a litre for the metrically inclined) or a little more (maybe an extra standard cup, making sure to stop drinking 2 hours before the race. This should give you about the right amount of time for any excess to get through the system, so you're hydrated at the start but don't need to go.
(2) Minimize the problem by not drinking as much. What I recommend above is, I think, the most important part of not having to go at all. But you should also make sure you're not drinking too much in the days before the marathon. I ruined one marathon by over-hydrating in the day before the race -- screws up your electrolyte balance. So long as you're not actually dehydrated, you only need to drink while carboloading in the days before. Don't go round quaffing too much water the day before.
In the race you also want to learn, again this is trial and error, how to adjust your drinking for temperatures. If it's cool ( < 55F/13C) and cloudy you don't need to drink too much. Obviously severe dehydration is bad, but mild dehydration is not necessarily a barrier to performance. Noakes' Lore of Running has some more on this, basically showing that the winners (2:10-2:12 performances) of some marathons they studied were more dehydrated than the 2:15-16ish runner up performances.
Winter is probably the best season to practice running long without taking on much water, and seeing how you feel. As always, gradually pushing out your limits, how far you can run without taking fluids, is the way to go. Personally my "best" is a 2:30ish training run without fluids, but I was well hydrated going into it.
(3) Learn to pee while running. Once you get past about half-way in a marathon the disruption to rhythm from stopping is no good. The "trick" is to be able to keep running at pace for a while as the pressure to pee continues to build. OTOH, you may find that it subsides, so learning to let the feeling pass (as it were) can only be done by trial and error. Now, if you still really have to go, you have a good "head of pressure" built up and you can let it all out pretty quickly. One good technique is to hold and squirt, and repeat several times so you don't have to have it dribble down your leg.
Hope that's helpful. Can't believe I've written that much about peeing and running!