Rookie Joc Pederson hit a tiebreaking homer in the eighth inning and Zack Greinke spun a gem on Friday night as the Dodgers edged the Padres, 2-1, despite another solid start from Andrew Cashner.