The "straight man" to Rex — and, increasingly, Moser — Ernst Stockinger (Stocki for short) is a character who becomes much more likeable as his part in the series develops. Stockinger is thin and always has a very serious demeanour. In later episodes, this is revealed as a cover for his schemes to outsmart Rex, who seems to instinctively want to associate with (or tease) him. Stockinger is by no means a dog lover.

Stockinger is married and uses his marriage to jokingly claim expertise over Moser in regard to women. Frequently, when a case hinges on the behaviour of a female witness or suspect, Stockinger gently tells Moser, "Richard, since your divorce, you've lost your touch with women". Stockinger's wife, it seems, is not greatly pleased with her husband's choice of career at times, and Moser often reminds him of this.

Another of Stockinger's idiosyncrasies is his constant references to surgery which has been performed on him - most likely for stomach ulcers. He seems to delight in telling stories about this surgery at the most inappropriate moments, such as when the others are about to eat.

Eventually, Stockinger is transferred to Salzburg and leaves the series. In this final episode, Rex saves Stockinger by leaping across a classroom just as a disgruntled divorced man was about to stab Stockinger in the throat during an attempted kidnapping attempt on his child. Moser, in a farewell speech, jokingly tells Stocki that, "You have been a bad cop, a bad man, and not at all a good friend". Stockinger later features in a spin-off two season television series, Stockinger, featuring him at his new police department. He is replaced by Christian Böck.