DETROIT -- Pablo Sandoval hit a tiebreaking double in the top of the ninth inning, then the San Francisco Giants held on for a 4-3 win over the Detroit Tigers on Friday night when Brennan Boesch lined into a double play with the bases loaded.