PC Robbie Milne acted deplorably in a city nightclub, the sheriff court heard.