SAN FRANCISCO -- The Arizona Diamondbacks are costing themselves crucial late-season wins by missing scoring opportunities.
Two straight shutouts by the San Francisco Giants and Arizona dropped into a first-place tie with Colorado in the NL West.
Pinch-hitter Gorkys Hernandez singled home the winning run with one out in the ninth inning, lifting the Giants to a 1-0 win on Tuesday night.
"We've got a long way to go. We can't win it today and we can't win it tomorrow," manager Torey Lovullo said. "We've got to play good baseball for another 30-plus days. Our guys are battle-tested. They're smart, they're aggressive, they're tough, and I want them to remember that."
Steven Duggar scored the deciding run moments after what looked like a potentially serious injury. Duggar stayed in the game after making a headfirst slide back into second on Nick Hundley's single after he initially rounded second. Duggar was seen testing his bruised left shoulder, which will be re-evaluated Wednesday.
"I was out there, he was in pain," manager Bruce Bochy said. "He said, `I'm staying in this game."
Going back to Sunday's 5-2 win against Seattle, the Diamondbacks have gone 23 innings without scoring, shut out for the seventh time this season.
San Francisco earned its 12th shutout and extended its winning streak to four games.
"All we can do right now is just kind of put our head down and try to go win today," ace pitcher Madison Bumgarner said. "... We're not going to look behind, we're not going to look ahead. We're going stay focused on that day and then see where we're at at the end of it. It's no secret a lot of stuff has to go right and a lot of stuff has to go wrong."
Brad Ziegler (1-6) walked Duggar with one out, taking the loss for his first decision since returning to the Diamondbacks in a trade from Miami before the deadline.
Will Smith (2-2) pitched a 1-2-3 ninth for the win.
Diamondbacks reliever Archie Bradley allowed consecutive one-out walks in the eighth then manager Torey Lovullo turned to Andrew Chafin one out later and he retired Brandon Crawford on a groundout with runners on second and third.
Arizona failed to take advantage of a break in the seventh when Giants left fielder Austin Slater flubbed a lazy fly ball by Jon Jay then slid on his backside trying to retrieve the ball for a three-base error.
Bumgarner allowed four hits, five strikeouts and four walks. He has surrendered three or fewer runs in 13 of his 16 starts, but had nothing to show for this one. He was coming off eight strong innings in which he gave up one earned run to beat the Mets last Thursday.
Buchholz has allowed only one run over his last three starts and 23 innings.
San Francisco has played at least one one-run game in each of its last nine series.
Joe Panik thought he had a two-out double in the third when the play went to review and was overturned in just less than two minutes. He was thrown out at second by center fielder A.J. Pollock and credited with a single.
Diamondbacks: 1B coach Dave McKay was OK after he took a ball to the head during batting practice when it ricocheted about 75 feet off the protective L screen, according to Lovullo. ... Arizona recalled INF/OF Christian Walker from Triple-A Reno to add right-handed hitting depth on the bench and optioned RHP Matt Andriese to Class-A Visalia. Andriese, who also will work out at the team's Salt River Fields facility, will be stretched out to start and the D-backs didn't want to take innings from any potential September call-ups who need innings at Triple-A.
Giants: C Buster Posey is scheduled to return to the Bay Area on Thursday from Vail, Colorado, where he underwent season-ending right hip surgery Monday. Bochy exchanged texts with Posey and said "he's doing great" and is already up and moving around. ... RHP Jeff Samardzija is scheduled for a second opinion on his inflamed pitching shoulder Wednesday from Dr. Tim McAdams at Stanford.
Arizona 13-game winner righty Zack Godley (13-7, 4.59 ERA) is 5-0 with a 4.05 ERA over his last seven road starts and will be opposed in the series finale by standout Giants rookie Dereck Rodriguez (6-1, 2.30 ERA). The right-hander makes his second start since coming off the DL from a strained right hamstring.
More AP MLB: https://apnews.com/tag/MLB and https://twitter.com/AP-Sports
Red Sox reward manager Alex Cora with extension through 2021
The Red Sox gave manager Alex Cora a new deal Monday that included a one-year extension through the 2021 season and, most likely, a significant raise. Terms were not announced.
Did Melvin deserve AL Manager of the Year over Cora?
The Around the Horn crew breaks down why Bob Melvin deserved to win the AL Manager of the Year award over Alex Cora and Kevin Cash.
Rays' Blake Snell named AL Cy Young Award winner in first full season in majors
Blake Snell's breakout season has culminated in the AL Cy Young Award, over Astros ace Justin Verlander and Indians stalwart Corey Kluber.
Hal Steinbrenner: Manny Machado comments on hustling 'ain't going to sell'
Yankees owner Hal Steinbrenner says comments by prized free agent Manny Machado about not being "Johnny Hustle" won't go over well "where we play baseball."
Indians, Pirates swap five players, including Erik Gonzalez
The Indians and Pirates completed a five-player trade Wednesday that included Cleveland infielder Erik Gonzalez.
Kurkjian tabs deGrom to win NL Cy Young
Tim Kurkjian explains why he is picking Mets pitcher Jacob deGrom to win the National League Cy Young Award.