Just 7-14 since the All-Star break, the Giants snapped a four-game losing streak at home as they try to stay within striking distance of the postseason. At 55-57, they're 7 1/2 games behind the San Diego Padres for the National League's third and final wild-card spot.
Rodon (11-6) gave up six hits, struck out seven and didn't allow a walk. His 2.95 ERA is tied for ninth in the league. The All-Star left-hander, in his first season with the Giants, has been particularly sharp at home, where he improved to 6-1 with a 1.89 ERA, fifth-best in the majors.
''It's definitely a good place to pitch,'' Rodon said of Oracle Park. ''The field, it's usually pretty big . The mound feels good. I mean, everything about it.''
Pittsburgh (45-68) lost for the sixth time in eight games despite getting homers from Rodolfo Castro, Ben Gamel and Greg Allen. Right-hander Bryse Wilson (2-7) took the loss, allowing four runs over 5 1/3 innings.
Though the Pirates weren't charged with an error, it was an adventurous night for their defense.
First baseman Michael Chavis made a nice stop on Yastrzemski's bases-loaded chopper in the third but bounced his throw home and a run scored. Left fielder Tucupita Marcano dropped a foul pop-up in the fourth when he collided with teammate Castro. Then Bryan Reynolds misplayed Yastrzemski's deep fly to center in the fifth that went for a two-out RBI double and a 4-1 San Francisco lead.
Yastrzemski entered the night hitting .169 since June 1, lowest among qualified major league hitters. But he broke a scoreless tie in the second, hitting Wilson's first pitch of the inning over the wall in left-center for his 12th homer.
''I'm just trying to take it one at-bat at a time and have good plate appearances and try and be useful somehow to the team,'' Yastrzemski said. ''Whether it's a walk, seeing a lot of pitches, you know, just staying focused on that has kind of helped relieve some of the stress of the struggles that have been going on.''
The Giants got clutch work from lefty reliever Alex Young in the eighth as they clung to a 4-3 lead. With the bases loaded and one out, Young struck out Allen and retired Marcano on a grounder to second.
''We didn't get a run across with the bases loaded, and, you know, that ended up costing us,'' Pirates manager Derek Shelton said. ''I mean, we have got to capitalize. We've got to get at least one there.''
Luis Gonzalez added a two-out RBI double in the eighth to provide San Francisco some cushion, and Camilo Doval nailed down his 16th save.
Pirates: RHP Yerry De Los Santos (right shoulder strain) was placed on the 60-day IL, ending the rookie's season. De Los Santos issued three walks and was charged with four runs without recording an out Thursday against Arizona. An MRI on Friday confirmed the shoulder strain. De Los Santos, 24, went 0-3 with a 4.91 ERA and three saves over 26 appearances. Pittsburgh selected the contract of RHP Austin Brice to take his roster spot.
Giants: LHP Thomas Szapucki was recalled from Triple-A Sacramento and RHP Yunior Marte was optioned. Szapucki, acquired in the trade-deadline deal that sent OF Darin Ruf to the Mets, gave up Allen's homer in the seventh that shaved the Giants' lead to 4-3.
Pirates: 3B Ke'Bryan Hayes sat out with back spasms, though Shelton was optimistic that Hayes could avoid the IL.
Giants: C Joey Bart (right ankle sprain) was out of the lineup for the third straight game. He was available in an emergency, manager Gabe Kapler said, and is likely to return this weekend.
Pirates RHP Tyler Beede (1-1, 3.57), who was designated for assignment by San Francisco in May before being claimed by Pittsburgh, faces his former team Saturday. The Giants counter with RHP Logan Webb (10-5, 3.17), who beat the Pirates with eight scoreless innings on June 17.
More AP MLB: https://apnews.com/hub/MLB and https://twitter.com/AP-Sports
Copyright 2022 STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.