Oxicodone is only moderately safe for term babies who are breastfed. It is not safe for pre-term breastfed babies.
Since this is a prescription painkiller, your doctor will be able to prescribe something more safe than this if you are concerned about the baby and you want to breastfeed.
You do have to ask, because mine didn't tell me much about what they were giving me (oxicodone) and they were actually sneaking formula to the baby when they made me think they were giving him my expressed milk.
Personally.....oxicodone didn't relieve any of my pain. Hospital strength doses of ibuprophen were more effective.