The Pennsylvania crowd loved it when President Trump took a whack at Chuck Todd.

But cursing out the moderator of "Meet the Press" was beneath the president.

If Trump wants to challenge Todd over something he said or reported, he has every right to do that. I've just published a book arguing that the coverage of this president has been overwhelmingly negative in ways that fuels an erosion of trust in the mainstream media.

At the same time, calling the NBC newsman a "sleeping son of a bitch" brings the presidency down to the level of playground taunts. (His longtime nickname for Todd is "Sleepy Eyes.")

What does this do for the president other than rouse his supporters, who don't like or respect the media? They already love him. Such vulgarities do nothing to win over moderates or independents who are lukewarm toward Trump.

What makes the crack particularly surprising is that Trump and Todd actually have an off-the-record relationship. As I report in my book "Media Madness," the president has had him to the White House for private meetings. These generally begin with Trump yelling at Chuck over something he or NBC did, and Chuck yelling back, before they settle down to a civil conversation.

Todd, who deflected the rally attack with a sleepy joke, has been tough on the president, once saying that the White House "war on the media" is nothing less than "a war on the truth." But media people rallied around him after the SOB line. Tom Brokaw tweeted at Trump: "Really classy. Explain that to your children."

Conservative radio host and MSNBC analyst Hugh Hewitt called Todd a "great reporter" and said Trump "only slams those he is afraid of. He should sit down w/ CT on camera, not sling insults."

Anthony Scaramucci, the short-lived communications director, offered his former boss some advice in an interview with MSNBC's Kasie Hunt: "When he's tweeting at journalists, as an example, I would tell him, 'Hey, let’s not do that.' I think we made a very big mistake early on in the administration when Steve Bannon declared war on the media. I thought that was a very bad idea."

In an interview with Politico a day before the rally, Todd described how businessman Trump would phone him when he was first contemplating a White House run:

"For a long time, he used to call me up and be upset because I wasn't taking the idea of him running for president seriously in 2011. And we would have these half-hour conversations regularly, and I would sit there—and I remember one time with Savannah Guthrie and I, we, literally put him on mute, going, 'Does he have other things to do but call?'"

Since "The Apprentice" was running on NBC, Todd said, Trump once called him and said, "'Come on, we’re colleagues. I make you a lot of money.' I'm like, 'What?'"

In that conversation with Politico's Susan Glasser, Todd said Trump has been "shooting from the hip," ignoring advisers while going "by his gut," and bashing the media while "begging for compliments" from them.

On Sunday morning, Trump unloaded on New York Times reporter Maggie Haberman, who covered him for years in New York and probably knows him better than any other political journalist.

Haberman co-authored a story saying Trump was in discussions with a lawyer about joining the White House to help with the Bob Mueller investigation.

Trump tweeted that the "failing" NYT "purposely wrote a false story stating that I am unhappy with my legal team." But the story didn’t say that. It said that chief lawyer Ty Cobb has told people he expects to leave soon and Trump "has seesawed between expressing confidence in Mr. Cobb’s claim that the inquiry will wrap up in relatively short order and that he will be exonerated, and sounding frustrated with his team’s legal strategy."

The president also tweeted that "the writer of the story, Maggie Haberman, a Hillary flunky, knows nothing about me and is not given access."

Haberman responded with a tweeted "LOL," but the "no access" part is demonstrably untrue, given that she has interviewed the president a number of times. In fact, he called her a year ago to say he was pulling his original ObamaCare replacement bill.

In a subsequent interview, Trump told Haberman in a light tone that she had been accused of being "Hillary Clinton's PR person."

"Mostly by you," Haberman shot back.

In yet another interview, the president caused a stir by telling Haberman and two colleagues that Jeff Sessions had been "very unfair" by signing on as attorney general and then recusing himself in the Russia probe.

The bottom line is that Trump is entitled to bitch about his largely negative coverage. But calling journalists that word, or other choice expletives, hurts his stature more than theirs.