Surely there are pub pubs and then there are family restaurant pubs. If I was in a pub pub and someone was swearing away like a grimsby fish wife then so be it. If the establishment in question is marketing itself as a family friendly restaurant then its not appropriate.
Next to my house is a family pub, it markets itself as exactly this with 3/4s of its floor space being restaurant and a smaller bar (they even have kids menus that come with a pot of crayons). I’ve asked loud sweary types to keep it down before when they were about a foot from my kids and describing a very sordid affair with a lady who liked bum sex. It seemed fair to ask them to keep it down a bit, if they’d refused I’d have asked the staff to have a stronger word. Getting all up in the face of a drunk is never going to end well and is not my job.
Calling out racists is always appropriate no matter the establishment…