SAN FRANCISCO Matt Cain breezed through seven scoreless innings, Buster Posey picked up his 100th RBI of the season, and the Giants beat the Diamondbacks 6-0 in their final night game of the regular season at AT&T Park.Starting pitching report The game opened with an error by Brandon Crawford, but Matt Cain worked around it and completed a scoreless first inning with only four pitches thrown. Crawford committed another inning-opening error in the third, but Cain kept his composure and the Diamondbacks off the board with three straight ground ball outs. Paul Goldschmidt, who haunted Tuesdays starter Tim Lincecum as he has throughout his young career, struck out looking against Cain in the fourth. The punch-out was Cains 187th of the season, which set a new career-high.The fifth inning started with another error, this time by Brandon Belt, but Cain retired the next three batters to keep his shutout intact. The sixth was as smooth as they come for Cain, who induced back-to-back fly outs, then struck out Miguel Montero swinging to end the inning.Cain ran into his first self-induced trouble in the seventh, when Goldschmidt hit a towering fly ball off the wall in right that a leaping Hunter Pence couldnt get to. Gerardo Parra followed with a perfectly placed bunt, which Pablo Sandoval watched as it went past the bag at third and suddenly Arizona was threatening with runners at first and third and no outs. But Cain reared back to strike out former Giant Cody Ransom and John McDonald for the first two outs, then got pinch hitter Jason Kubel to ground out to Belt at first to escape the jam unscathed. Cain walked back to the Giants dugout after his seventh scoreless inning to a standing ovation. The Giants veteran right-hander gave up four hits, walked one, was charged with a wild pitch, and struck out six. He threw 91 pitches on the evening, 67 of which were strikes. Cain extended his career-high win total to 16 and lowered his full-season career-low ERA to 2.77.Bullpen report After Aubrey Huff flew out pinch-hitting for Cain in the seventh, Bruce Bochy turned to Guillermo Mota in the top of the eighth. Mota allowed a leadoff single to Adam Eaton and got bailed out by defensive replacement Gregor Blanco on a deep fly ball to left. He struck out Justin Upton before giving way to southpaw Jeremy Affeldt. Affeldt gave up a single to the left-handed hitting Montero, and Bochy left him in to face the right-handed Goldschmidt, who grounded into an inning-ending fielders choice.Dan Otero got the call in the ninth and promptly gave up a leadoff double to Parra. But he struck out Ransom, induced a shallow fly ball to left from McDonald and got pinch-hitter Ryan Wheeler to fly out to center to end the game.At the plate Cain sparked the Giants first run-scoring rally of the game with a line-drive single to center to lead off the third inning. Angel Pagan followed with a walk and Marco Scutaro dropped a sacrifice bunt to put runners on second and third for Pablo Sandoval. Diamondbacks shortstop John McDonald booted a ground ball up the middle off Sandovals bat that was ruled an RBI single, though it may have been an error in Arizona. There was no official scoring to debate when Buster Posey lined a clean single to left to score Pagan for his 100th RBI of the season. Posey became the first Giant since Barry Bonds in 2004 to reach the century mark.The Giants expanded their lead with another two-run inning their next time up. Brandon Belt led off the fourth with a triple that fell just out of the reach of rightfielder Justin Upton in Triples Alley. Brandon Crawford followed with a walk and Matt Cain reached on an error on a sacrifice bunt to load the bases. After Pagan popped out to shallow right, keeping Belt at third, Scutaro came through with an RBI single to extend his hitting streak to 14 games. Sandoval hustled down the line to avoid an inning-ending double play and pick up his second RBI of the evening for a 4-0 Giants lead.Cains second single of the game gave the Giants a 5-0 lead in the fifth. Hunter Pence reached on an error to lead off the inning and moved into scoring position on Belts second hit of the game. Cain followed with a ground ball in the hole that McDonald backhanded but didnt get enough on the throw, allowing Pence to score and Cain to reach first.The Giants added an unnecessary insurance run in the eighth. Scutaro hit a one-out double, advanced to third on a wild ball four to Sandoval and scored on another wild pitch.The Giants racked up 12 hits and finished 4-for-16 with runners in scoring position. Every Giants starter reached base. Pagan and Xavier Nady did so with walks, while the rest of their starting teammates recorded at least one hit.In field Brandon Crawford tripped while fielding Adam Eatons routine ground ball to open the game for a rare error from the sure-handed shortstop. But Marco Scutaro picked his fellow middle infielder up by tagging out Eaton on his way to second and throwing to first to double up Aaron Hill.Crawford had a line drive pop out of his glove in the third inning for another error, just the fifth in his last 75 games, but it didnt cost Cain.Brandon Belt committed his seventh error of the season in his seventh career three-hit game.On the bases The Giants didnt attempt a single theft and the Diamondbacks didnt test Posey, who has allowed 85 steals (second in MLB), but caught 30 runners (also second in MLB).Attendance The Giants announced a paid crowd of 41,516 for another sellout, their 164th straight. Up next The Giants conclude their three-game series with the Diamondbacks in a Thursday matinee game. Arizona will start LHP Patrick Corbin (6-7, 4.02 ERA) opposite LHP Barry Zito (13-8, 4.18 ERA) in the last regular-season game of the year at AT&T Park.