I agree, 5 gallons is too small for alot of fish, more so goldfish. I actually just rescued a goldfish that has been stunted by a small tank. He is a comet goldfish they has lived in a 1.77 gallon for 1 1/2 years. :/
Here is a picture of him, see how his head is abnormally round and his body is mis-shapen.
(He is in a 10 gallon right now because he lacks the muscles to move very well, I am going to upgrade his tank once he swims a little better.)