Updated

Buster Posey had three hits and two RBIs to back Matt Cain, and the San Francisco Giants beat the Houston Astros 3-2 on Sunday to complete a three-game sweep.

Cain wasn't as dominant as he was when he pitched the first perfect game in Giants history against the Astros on June 13 but did just enough to win for just the second time since that historic night. San Francisco's right-hander struck out six and walked one.

The Giants won despite being without their best hitter. Melky Cabrera took a temporary leave to attend the birth of his child in Florida.

Marwin Gonzalez had two hits and scored Houston's only run. The Astros fell to 1-10 in July.