I sometimes cook more pasta than I intend to eat or use at once and store the rest in a container in the fridge (just plain, cooked pasta). How long would it store safely for?
http://www.stilltasty.com/fooditems/index/17887 is as good advice as any I'd give.
In my experience, it gets some slimy mold stuff on it. If it feels slimy, its probably not good to eat, although the mold might taste delicious, you never know...
I've stored it for over 2 weeks without water and all that crap others are telling you. As long as it doesn't have green mold on it, it is safe to eat. Otherwise only a really bad smell would be bad. Easily over 14 days if kept in a container with a lid. In fact I store my pasta sause in a container as well for just as long. People will have you throwing away good food just because they don't know or are uninformed. I've save a bunch of money doing it my way. Like meats for over 2 weeks and fruits and vegatables. If it ain't got green on it or smells bad then it's still good to eat.