Longoria was injured Thursday when he was hit in the hand by a pitch from Miami's Dan Straily. Longoria underwent an examination in Los Angeles on Saturday morning and said surgery was not required.
The procedure could improve his recovery time, he said.
"Hopefully soon after the All-Star break, I should be back," Longoria said before the Giants played the Dodgers. "It shouldn't be too long before I can start the process of strengthening it. Once the incision heals, it's pretty much pain tolerance.
"It's best to say six to eight weeks, but I have a hard time telling myself that. I'll definitely push for some time soon after the All-Star break."
The surgery is scheduled Tuesday in Los Angeles by hand specialist Steven Shin, and a permanent pin will be inserted into Longoria's left hand.
Longoria was a three-time All-Star in 10 seasons with Tampa Bay before being traded to the Giants last winter.
After Thursday's game, Longoria said he last broke a bone in his wrist when he went to the 2008 World Series as a Ray.
The Giants will miss Longoria, who is tied for the team lead with 34 RBIs, is second with 10 home runs and is tied for second with 27 extra-base hits.
Information from the Associated Press was used in this report.