THE EPIC DINO! But seriously, please don't use this name. Your child will likely be made fun of, and there are no nicknames that I can think of for "Barney".
In the Dark is Rising series by Susan Cooper, one of the three main characters from the first book, Under Sea and Over Stone, is Barney, he is the brother of Jane and Simon.
Barney & Friends is a popular children's television show produced in the United States, mainly aimed at preschoolers. Barney is a purple anthropomorphic Tyrannosaurus rex who conveys learning through jumping around singing childrens' songs with a friendly, optimistic attitude ("I love you, you love me, we`re a happy family, with a great big hug and a kiss from me to you, won`t you say you love me too!").
There's an old TV show called "Barney Miller" but I can't remember what exactly he did, maybe a detective? OR am I confusing him with Barnaby Jones? Also, US Representative Barney Frank, from Massachusetts, was for a very long time the only openly gay US congressman. He is still very popular and well-liked, although he hasn't entirely escaped from scandal. Some years ago, it was revealed he had hired an "assistant" who was actually a male prostitute and that this assistant was using Frank's apartment and phone to do "business."