This article is from the Real Ale FAQ, by with numerous contributions by Brett Laniosh others.
A: If your beer tastes (and smells) "vinegary" it is definitely off and
you should ask for a replacement. If the beer just doesn't taste as it
should, it could be one the last few pints drawn before the barrel is
empty or a bad batch from the brewery. Again you can ask for a replacement
and often you will often see the barrel being changed shortly afterwards!
It's rare these days to get "cloudy" beer but again, even if it tastes ok,
you should ask for a fresh one. Don't be fobbed off by a barman telling
you that no-one else has complained about the beer. Some drinkers may
actually like foul tasting beer and others just don't like to complain!