A man holds a sign during a 2017 press conference at the Mickey Leland Federal Building in Houston calling for action to help DACA recipients.

Photo: Jon Shapley, Staff Photographer / Houston Chronicle

It must be tough to be a Republican state attorney general with a member of your own party occupying the White House. All that fun you had suing a Democratic president gets taken away.

Texas Attorney General Ken Paxton, like his predecessor Greg Abbott, took great pleasure in suing the Obama administration. Sometimes he won, sometimes he lost, but it was always red meat to the base. Now with Donald Trump in the White House, what to do, what to do?

Sue the Obama administration, anyhow. That’s essentially what Paxton did this week when his office filed a lawsuit in federal court challenging the constitutionality of Obama’s Deferred Action for Childhood Arrivals program, or DACA. Six other states — all with Republican attorneys general — joined Texas in the lawsuit.

“I honestly don’t understand what the state is asking for,” U.S. Sen. John Cornyn said Friday in Dallas.

When you’ve lost Cornyn, you’ve lost mainstream Republicans.

DACA protects from deportation almost 800,000 undocumented children and young adults who came to the United States as children. It’s a common-sense policy that enjoys broad public support. Paxton threatened last year to file a lawsuit challenging DACA’s legality unless the Trump administration repealed the policy.

Last year, the administration announced that it would wind down the program in March, saying it was responding to Texas and other states threatening to sue. At the time, Paxton declared victory and holstered his weapon.

But the Trump administration decision immediately drew legal challenges, and three federal judges so far have blocked the repeal. In the most recent decision, issued in April, a Republican-appointed federal judge said the administration didn’t make a legal case for the repeal. Judge John Bates said the administration was relying on the threats of suit by Texas and other states to justify its actions, and gave the administration 90 days to come up with better arguments.

The most recent court ruling also undercut one of Paxton’s key assertions in the DACA lawsuit — that courts had struck down another Obama executive order, Deferred Action for Parents of Americans, and would do the same with DACA. The administration made the same argument in defense of the DACA repeal. Bates pointed to numerous differences between the two orders and said such reasoning was weak.

The courts are in the process of settling whether the Trump administration acted legally in repealing DACA. The ultimate decision likely will come from the U.S. Supreme Court. Paxton and the other attorneys general could have been content to let the current court process play out, but weren’t.

Paxton’s legal decision to file a lawsuit in the midst of other lawsuits around DACA is a waste of taxpayer resources. But it’s showing the Republican base that he’s tough on immigration, which is the main point.

The suit essentially seeks to end the DACA program in two years. If DACA were to end without something like it in its place, the results would be disastrous for Texas. More than 100,000 people entering the prime of their working lives would suddenly be thrust into limbo.

We have said repeatedly that the best course of action is for Congress to pass legislation that permanently normalizes the status of people who were brought to the country illegally through no fault of their own. Trump and other Republicans have said they support such an approach, but their actions belie their words. They see DACA, at best, as a way to leverage other immigration policy goals.

Democrats also say they back legislation to permanently protect the so-called Dreamers, but their legislative leaders are willing to wait to see what the courts will decide. They may come to regret that approach.

We’re sure Paxton’s feeling better about himself these days. The lawsuit gets his name and immigration in the same sentence. The attorney general also finally gets headlines that aren’t related to his ongoing securities fraud case. But pursuing a lawsuit that is clearly bad for Texas, and wasteful to boot, is nothing to feel good about.