Drinking and breastfeeding?

I’m a new mom, my son is 2 weeks old. He had his 2 week check up this morning, he’s doing fantastic, putting on great weight, overall very healthy, hasn’t had any medical issues. I don’t remember how it came up but his pediatrician told me not to be drinking while breastfeeding, and if I do, I need to pump and dump. He also told me not to drink much coffee: I don’t drink much for alcohol or coffee anyways but I’ve always read that breastfeeding and drinking coffee or alcohol is safe for the most part. I’ve already had a drink or 2 since coming home from the hospital, is it actually unsafe for me to breastfeed and drink??