It’s a wonder that Democrats haven’t staked out a negotiating position demanding the ­destruction of already-existing barriers along the US-Mexico border.

Their opposition to President Trump’s border wall — or, more properly, his so-called wall — is now so total as to be nearly indistinguishable from opposition to any serious infrastructure at the border at all.

The partial government shutdown is fueled by a clash of ­visions over, ultimately, the legitimacy of borders and, proximately, physical barriers to make our southern border more secure.

Trump has the better part of the argument, but his lurch into the shutdown with no discernible strategy and his scattershot pronouncements make it unlikely that his view will carry the day.

Obviously, a 2,000-mile-long border wall rivaling the best work of the Ming Dynasty never made any sense and was never going to happen. And short of Trump finding a latter-day Gen. Winfield Scott to go occupy Mexico City, Mexico wasn’t going to suffer the humiliation of funding a Yanqui border wall.

This was all lurid fantasy, and Trump has conceded as much, ­although he will, at times, deny having conceded as much. His ­ambitions are now much more reasonable, involving the kind of ­up-to-date bollard or “steel slat” fencing that already exists in places. But he’s running into an opposition that is much less reasonable.

Triggered as always by Trump, and growing more dovish on ­immigration almost by the hour, Democrats are treating the notion of a wall as practically a human-rights abuse.

President Barack Obama routinely droned people without generating as much high dudgeon as Trump does asking for $5 billion to better fortify our southern border.

Sen. Chuck Schumer calls the wall “medieval.” It’s true that the core idea — a physical barrier to impede the movement of people — isn’t a new technology. The basic concept proved out so long ago that there hasn’t been any need to revisit it.

Nancy Pelosi deems the wall “immoral.” She sounds like West Berlin mayor Willy Brandt condemning the Berlin Wall as the “Wall of Shame” — when the East Germans built their border barrier to keep people in, whereas we only want to keep illegal entrants out.

If a wall is immoral, what standing does the current 350 miles of primary fencing have? Isn’t it just as hateful as what Trump proposes? The $5 billion the president wants wouldn’t even match what we already have — it would construct about 150 miles of new barriers where none currently ­exist.

A wall or fencing is relatively mild as far as immigration ­enforcement goes. It doesn’t ­involve deporting anyone. It doesn’t separate families. It doesn’t prosecute and detain anyone. It doesn’t deny any illegal immigrant currently working in the US a job.

All it does is seek to avoid getting in a situation where these other things are necessary in the first place.

A wall doesn’t close down the border or close us off to the world. There are still ports of ­entry. People can still travel to and from Mexico. People can still, for that matter, fly to Paris. A wall only diminishes illegal entry at certain strategic points.

Robust fencing made an enormous difference in stopping illegal crossings in Yuma, Ariz. The area had only about 5 miles of fencing in the mid-2000s, then saw the extent of its fencing ­increase 10-fold. Illegal crossings plummeted.

Yuma got that additional fencing thanks to the passage of the Secure Fence Act in 2006 on a ­bi-partisan basis, prior to the Democratic Party becoming ­unsettled by the prospect of putting physical barriers in the way of illegal entrants.

The wall isn’t the most important immigration enforcement measure. Requiring employers to verify the legal status of their ­employees would be much more consequential. But the wall has taken on great symbolic significance. What it denotes, perhaps more than anything else, is the growing irrationality of the Democrats on immigration.