PHOENIX -- When the roof is open at Chase Field, the ball tends to fly out.
That's what happened Friday night.
Pirates manager Clint Hurdle knows all about the ballpark and what happens in the dry desert air because he made regular trips there in eight seasons as manager of the Colorado Rockies.
"You open that roof, hot like this, I've seen a bunch of ball games here for a lot of years," Hurdle said. "Some crazy things can happen."
All three home runs came off Patrick Corbin (1-2), who allowed five runs in six innings.
"A couple of mistakes early," Corbin said, "and in this ballpark if you make mistakes early they are going to go a long way. `'
"It was a tough night to pitch," Arizona manager Chip Hale said. "Obviously the ball was really carrying with the roof open. There were some balls that were hit pretty hard. `'
Jonathon Niese (3-0) got the win despite surrendering four runs and 10 hits in 5 1/3 innings.
Mark Melancon allowed three straight singles with two outs in the eighth but pitched a perfect ninth for his fourth save.
The Diamondbacks rallied with three runs in the eighth, the last on Jean Segura's face-first slide into first base for an RBI infield single to cut Pittsburgh's lead to 8-7. Arizona threatened more when Paul Goldschmidt beat out a grounder to the shortstop Mercer, a call reversed on review after he initially was ruled safe, to load the bases, but Yasmany Tomas bounced out to third to end the inning.
The Diamondbacks, back from a 7-3 road trip, fell to 2-6 at home.
Mercer said he could feel the difference when the roof opened just before the game began.
"You could feel the wind whipping in there," he said. "You could feel it out there definitely on the field that the ball was flying."
Rodriguez and Polanco hit consecutive home runs in the second inning
Rodriguez's two-run shot landed in the picnic area far above the concourse in left. Two pitches later, Polanco's home run bounced high off the batter's eye in center, far above the 407-foot line.
Mercer's homer, leading off the fourth, went farthest of all. Major League Baseball's statcast measured it at 466 feet, longest in the majors this season.
"Oh man, I thought Cheech's (Rodriguez) and Polanco's were way better than mine," Mercer said. "They were higher. Mine was kind of on a line."
Hale said the plan is for struggling RHP Shelby Miller to make his next scheduled start, but that could change.
Miller walked four straight batters to start the third inning and was yanked in Sunday's win at San Francisco. The right-hander, acquired in an offseason trade with Atlanta, is 0-1 with an 8.59 ERA in four starts.
His next scheduled start is Tuesday against the St. Louis Cardinals, the team that drafted him in the first round in 2009. He was 15-9 for St. Louis in 2013, a year the Cardinals won the World Series.
Pirates: LHP Cory Luebke (right hamstring tightness) began his rehab assignment by pitching two scoreless innings for Triple-A Indianapolis on Thursday. ... RHP Jared Hughes (left lat muscle strain) made his first rehab appearance Wednesday, also pitching two scoreless innings for Indianapolis.
Diamondbacks: RHP Josh Collmenter (shoulder) begins extended spring training this week and is expected to pitch three innings in early May, probably with a minor league team.
Pirates: RHP Juan Nicasio (2-1, 4.80 ERA) makes his fourth start of the season, meeting Arizona on Saturday night in Pittsburgh's fifth game of a 10-game road trip.
Diamondbacks: RHP Rubby De La Rosa (1-3, 8.44) is back for his third start after two relief appearances.
How the Rangers, Mets, Blue Jays and Mariners combined for the wildest day in MLB free-agency history
With the lockout looming, teams were looking to lock down big-name free agents. On Nov. 28 and 29, they did so in dramatic -- and expensive -- fashion.
How did the Mets land Max Scherzer?
Jeff Passan reports on Max Scherzer finalizing a massive three-year deal with the Mets.
Right-hander Carson Fulmer taken by Los Angeles Dodgers' minor league team from Cincinnati Reds
The Los Angeles Dodgers' Triple-A team at Oklahoma selected right-hander Carson Fulmer from Cincinnati with the 39th and final pick of the Triple-A phase of Major League Baseball's annual draft of unprotected players.
Late Indians outfielder/commentator Jack Graney wins Frick Award
Cleveland Indians outfielder and commentator Jack Graney has won the Hall of Fame's Ford C. Frick Award for excellence in broadcasting.
What's next for the NL West? Lockout leaves MLB's wildest division with huge question marks
The Giants lost a franchise icon. The Dodgers are missing some familiar faces. The Padres imploded and hired a new manager. And what about the futures of the Rockies and D-backs?
Tim Kurkjian is a Hall of Famer! Here's what makes him so great
As Cooperstown calls for our colleague, we share a few favorite memories of working alongside him.