"We've been talking about it," Bochy said. "We just set a date after [our last series in Colorado] and just said, 'Let's just go ahead and get this thing done,' for his peace of mind and everybody's. He's at a point where it was time to go ahead and let's get this done."
Bochy said Melancon, who didn't travel with the club to Chicago, could begin throwing again in six to eight weeks, and will be able to return by Spring Training.
The surgery will alleviate chronic compression of a muscle in Melancon's right forearm, which the right-hander -- who signed a four-year, $62-million contract this offseason to anchor the back end of the Giants' bullpen -- has dealt with all season. Bochy said Melancon offered to continue pitching to help San Francisco down the stretch, but the club wanted to take care of the issue as soon as possible.
"We appreciate that even though [the forearm tightness] was in there, he still wanted to help us out," Bochy said. "We certainly appreciate Mark doing that, but it's time to get that thing fixed and get him full-strength."
Melancon has been on the disabled list twice this season due to his forearm, and of late, he has been in a setup role while Sam Dyson serves as the Giants closer. He registered a 4.50 ERA and 11 saves in 32 appearances this season. Melancon has 179 career saves and a 2.72 ERA over nine Major League seasons, and he made at least 70 appearances from 2013-16.
The Giants' bullpen entered Friday's game against the White Sox with a 4.50 ERA, the eighth-highest in baseball, after posting a 3.65 ERA last season.
Posey back in lineup
Buster Posey was back in the lineup Friday after missing Wednesday's win over the Rockies with a bruised ring finger on his right hand. Posey was San Francisco's designated hitter and hit third in the series opener against the White Sox. Bochy said he'd like to use Posey as a DH "a couple times" during the Interleague series in Chicago.
"Especially with him coming off that bruised finger on his throwing hand, he's playable, but it just makes sense to DH him today," Bochy said. "Plus it's Nick [Hundley]'s birthday. You have to play on your birthday. It's a new rule."
Posey has been the Giants' most productive this season, entering Friday's game with a team-high .318 average to go with 12 homers, 59 RBIs and an .870 OPS in 122 games.
Bochy said Jarrett Parker, who should be ready to go on Sunday after dealing with a mild left oblique strain, is a candidate to serve as a designated hitter during part of the club's three-game set, as well. Parker took batting practice on Friday and will be re-evaluated in hopes of playing Sunday.
Fabian Ardaya is a reporter for MLB.com based in Chicago who covered the Giants on Friday.
This story was not subject to the approval of Major League Baseball or its clubs.