Any red wine, except a very delicate old one, will last three or four days after the cork has been pulled. Simply replace the cork and put the half-empty bottle in a cool place. Often, a little exposure will enhance a young red. White wine, recorked, will survive in the refrigerator for a week. Whenever it is unpleasant to taste and smell.
Protocol suggests that the waiter or captain be consulted.
A good restaurant will always replace a wine - sometimes even when there's nothing wrong with it. There is one other rule. It supersedes the above. At least one bottle per person. That includes both red and white, if you plan to serve one wine with the appetizer and another with the main course.