Giants 4, Pirates 3:
Clint Barmes' throwing error with the bases loaded in the bottom of the ninth inning gave San Francisco its fourth victory in five games.
Emmanuel Burriss led off the ninth with a sharp single to right off Chris Resop (0-1). Pinch hitter Ryan Theriot, after failing twice to sacrifice Burriss to second, delivered a single to right with Burriss off on the pitch and advancing to third.
After Angel Pagan was walked intentionally, Melky Cabrera hit a 3-2 pitch to Barmes, who threw low to the plate to allow Burriss to score and send the Pirates to their fifth straight loss.
Barry Zito, who recorded his first shutout in nine years Monday at Colorado, turned in another stronger performance as he allowed six hits and three runs (two earned) in seven innings. Javy Lopez (1-0) recorded the final out in the ninth inning after Santiago Casilla pitched 1 2/3 scoreless innings.
Pirates starter Charlie Morton allowed three runs and seven hits in five innings in his season debut.
With two outs in the first, Pittsburgh strung together two hits and a walk before Neil Walker delivered a two-run single.
San Francisco tied it in the second on Nate Schierholtz' RBI triple and Burriss' run-scoring single.
The Pirates took a 3-2 lead in the fifth when Alex Presley scored from second base on shortstop Brandon Crawford's throwing error after Pablo Sandoval's fielding miscue started the play.
The Giants tied it 3-3 in the bottom half after Pagan delivered a one-out triple and Sandoval's two-out infield hit caromed off Morton's leg.
Cabrera went 0-for-4, the first game this season he didn't record a hit. ... The Pirates have scored seven runs during their losing streak.