From Wikipedia:
Barney Miller is an American sitcom set in a New York City Police Department police station in Greenwich Village. The series originally was broadcast from January 23, 1975, to May 20, 1982, on ABC. It was created by Danny Arnold and Theodore J. Flicker. Noam Pitlik directed the majority of the episodes.
Captain Barney Miller (Hal Linden) tries to remain sane while leading the 12th Precinct's detectives: crochety, nearing-retirement Jewish-American Philip K. Fish (Abe Vigoda); naive, gung-ho but goodhearted Polish-American Det. Stanley "Wojo" Wojciehowicz (Max Gail); ambitious, intellectual, arrogant African-American Det. Ronald "Ron" Nathan Harris (Ron Glass); philosophical, wisecracking gambler Japanese-American Nick Yemana (Jack Soo); and dauntless beleaguered Puerto Rican Chano Amanguale (Gregory Sierra). Miller also has to deal with his unapologetically old-school superior, Deputy Inspector Frank Luger (James Gregory), and diminutive and obsequious uniformed Officer Carl Levitt (Ron Carey), who passive-aggressively badgers Miller constantly about being promoted to detective. Amanguale was replaced by intellectual Arthur Dietrich (Steve Landesberg) from the third season on.
The show's focus was split between the detectives' interactions with each other and with the suspects and witnesses they detained, processed, and interviewed. Some typical conflicts and long running plotlines included Miller's frustration with red tape and paperwork, his constant efforts to maintain peace, order, and discipline, and his numerous failed attempts to get a promotion; Harris's preoccupation with outside interests, such as his living arrangements but mainly his novel ("Blood on the Badge"), and his inability to remain focused on his police work; Fish's age-related health issues (incontinence), marital problems, and reluctance to retire; Wojciehowicz's impulsive behavior and love life; Luger's nostalgia for the old days with partners Foster, Kleiner and Brown; Levitt's (eventually successful) quest to become a detective; the rivalry between the precinct's resident intellectuals, Harris and Dietrich and continually - but reliably - bad coffee (usually made by Yemana).
Decades after its cancellation, Barney Miller retains a devoted following among real-life police officers, who appreciate the show's emphasis on dialogue and believably quirky characters, and its low-key portrayal of cops going about their jobs. During his appearance on Jon Favreau's Independent Film Channel talk show Dinner for Five Dennis Farina, who worked as a Chicago policeman before turning to acting, called Barney Miller the most realistic cop show ever seen on television. Hal Linden has told interviewers that he is still occasionally called "Captain" by working police officers.