Gom, yes the answers do vary for each individual situation... but there are many medications that are safe for breastfeeding. I was on pain meds, zofran and reglan after the first surgery. All were okay for breastfeeding. I did pump as soon as I could after the surgery and I can't remember if I dumped it or kept it. Either way my lactation consultant and anesthesiologist both felt that as soon as I was awake enough to pump the medications would be out of my system and it would be safe to use that milk.
There are many good (scientific, evidence-based) sources to support this and to guide which medications are safe. A lactation consultant is a good place to start. Kellymom.com also has excellent, well-researched information:
http://kellymom.com/bf/can-i-b...surgery/mom-surgery/Most doctors don't have good information about the transfer of medications into breastmilk (I know, I'm one of them. We get almost no training on this topic). The book "Medications and Mother's Milk" by Thomas Hale summarizes effects of just about every medication on breastfeeding. Your lactation consultant probably has it but you can get it on amazon, too if needed.
The other big thing, though, is keeping up your supply. I needed extra IV fluids to stay hydrated. And there were times when I dreaded pumping- it is bad enough when you haven't just had surgery- but I knew I had to keep up my supply. Since you have a little one (who is probably too little to be freaked out by a hospital as mine were) it is probably best to keep him/her with you as much as possible to nurse which will be much better than pumping! (Assuming the meds you are on are safe.)
That said... your body goes through a lot after a big surgery, especially so soon after a pregnancy. So no matter what happens stay focused on the fact that you are doing the best you possibly can.