Leonys Martin and Mike Mahtook each added a double, while Jeimer Candelario and JaCoby Jones each had a base hit in the losing effort for the Tigers.
Castellanos was initially called safe with the winning run in the bottom of the 10th, but as the review dragged on, the jubilation died down a bit, and the Detroit players waited patiently in front of their dugout for word from the umpires. Polanco's drive to right-center on a 3-0 pitch from Alex Wilson (0-1) finally gave the Pirates a comfortable lead - or as comfortable as could be on a wacky day in which both teams scored four runs in the ninth. In his debut game with the team, Detroit manager Ron Gardenhire was ejected by first base umpire Bill Welke.
Final game time: five hours and 27 minutes.
In the eighth inning, home plate umpire Mike Everitt was hit in the mask with a pitch, and he had to leave the game. Gregory Polanco led the Pirates by going 3 for 5 with a homer, a double and four RBIs, while Josh Bell and Francisco Cervelli each added three RBIs, with Cervelli also adding a double.
The opening day game between Detroit and Pittsburgh on Thursday also was postponed because of rain and played Friday.
The Pirates used seven of their eight relief pitchers, and the group combined to allow eight runs on eight hits, twice blowing a lead built by the offense. Then Machado hit a two-run double off Josh Smoker with two outs to make it 10-all.
"Saw some people leaving at the top of the ninth", said Tigers bench coach Steve Liddle, who spoke to reporters afterward instead of Gardenhire.
Naturally, there was a replay review, but the Pirates seemed convinced that it wouldn't go their way, as they left the field.
Detroit's Jordan Zimmermann allowed four runs and six hits in six innings in the first opening day start of his career.
Pittsburgh's Ivan Nova allowed two runs and six hits in five innings.