SAN FRANCISCO - Andrew Cashner received a heads-up text message Saturday afternoon from manager Bud Black that he might be pressed into emergency duty as a spot starter.
Clayton Richard woke up to a stomach virus and was scratched, so the San Diego Padres turned to long reliever Cashner to take his spot in the rotation.
The right-hander allowed Pablo Sandoval's two-run homer during a solid four-inning outing, and that was all Tim Lincecum and the San Francisco Giants needed to beat San Diego 2-0 on Saturday night.
"He just told me to be ready to start today when I got here," Cashner said. "I prepare the same way every day whether I start or relieve. It's not a big surprise. It's just another day."
Cashner (0-1) allowed two hits and two runs in four innings, struck out five and walked one in his seventh major league start spanning four seasons.
In the fourth, Sandoval clobbered a fastball inside for the decisive hit.
"I threw the pitch I wanted to throw right there and I thought I had jammed him but he just got it up in the air," Cashner said. "It was right where I wanted to throw the ball. Had I had my good slider today, I probably would have gone there or a high heater. I thought I could get him to pop him up or strike him out."
When San Diego switched pitchers, Giants manager Bruce Bochy then shuffled his lineup for a right-handed starter, and said infielder Joaquin Arias and outfielder Andres Torres would start Sunday's series finale after they had been in Saturday's first lineup.
Sandoval delivered the key hit a night after Angel Pagan's winning, one-out double in the ninth lifted the Giants to a 3-2 win in the series opener.
"Sandoval's a talented hitter. He's a slasher. He hits all pitches," Black said. "That was a good pitch, mid-range, mid 90's fastball at the hands. He brought his hands into the ball and hit a fly ball to right that carried."
Sandoval fouled a ball off his right foot in the seventh but stayed in the game after being checked out, then Arias came in for defence at third base in the top of the eighth.
Bochy said Sandoval would likely be sore.
"I'm fine," the slugger said.
Padres leadoff man Everth Cabrera had a pair of hits, and his double to start the eighth was the Padres' lone extra-base hit in their first shutout of the year.
Lincecum kept them off balance, pounding the strike zone from the start while showing signs of regaining his old, dominant pitching form.
"I just went out there today with purpose and knowing that every pitch has got a meaning to it," Lincecum said. "When I can go out there and do that and you can stick to your game plan and know that it's going to work, it gives you something like a springboard to jump off of, instead of kind of going out there aimlessly."
No pitch was bigger than the one that induced Chase Headley's inning-ending grounder with the bases loaded in the third. After back-to-back changeups in the dirt, Lincecum went to his reliable fastball.
"He made the right pitch to get out of it. That was a big at-bat and pitch for Timmy to get out of that inning," Bochy said. "Tonight he was on. It was evident. He had great determination."
Lincecum (2-0) struck out a season-best eight batters in 6 2-3 scoreless innings, providing a steady presence on the mound after he had allowed four or more runs in a single inning in two of his previous three starts this year. San Francisco has won in each of his outings so far.
Sandoval connected for his third home run three pitches after another hard-hit ball fell about an inch foul of an RBI double. The drive landed in the elevated right-field arcade for a 2-0 lead in the fourth that held up. The Giants are 8-1 this season when scoring first.
Lincecum, who pitched in relief during last fall's post-season run to the championship after a season of struggles, retired the first six batters of the game in order, then escaped the third unscathed when he threw the 3-1 fastball for Headley's grounder.
"His fastball had good life on it," Headley said. "When a guy has a split-finger that really dodges the plate and he has a fastball that's riding through the zone, that makes that pitch better."
The next inning, Lincecum got three quick outs on seven pitches.
He allowed four hits and walked two, lowering his ERA from 5.63 to 3.97 as the Giants won for the 15th time in their last 19 games at home dating to last season.
Notes: San Diego placed RHP Tyson Ross on the 15-day disabled list with an injury to his non-throwing shoulder. If Richard is well enough, he would fill Ross' slot in the rotation at home Tuesday against Milwaukee. ... Bochy said he is sorry thousands of fans were late getting into the ballpark Friday night with extra security measures, including the use of electronic wands. "We certainly apologize to fans who did miss a few pitches in the game," Bochy said. "Sometimes things have to be done to be cautious." ... Before the bottom of the second, the Giants wished a "speedy recovery" to 11-year-old Aaron Hern of nearby Martinez after he was injured at the Boston marathon. His photo was shown on the main scoreboard and the boy received a standing ovation.