DAVID Cameron's gossiping about the Queen's response to the referendum result was a clear breach of royal protocol.

Worse than that, it was a flagrant contravention of the cat and dog code. How does the Prime Minister begin to apologise to Britain's foremost pooch lover for saying that she "purred" in response to his news that the vote had gone the Union's way?

Mr Cameron would be advised to wear especially thick socks when he attends his grovelling session with the Queen. Monarchs can dispense a nasty nip when they have a mind to.

The Prime Minister's conversation with former New York City mayor Michael Bloomberg, caught on microphone, was a tantalising glimpse into the unofficial workings of the British state. One would like to know, for example, when the phone call from Downing Street to the Queen was made.

What came across loud and clear, at least from Mr Cameron's account, is that this was the result the monarch wanted all along. The Queen herself, of course, had studiously tried to keep out of the matter in public, save for a bland wish that Scots would think carefully about how they voted. While even the corgis in the street could have guessed which outcome she favoured, the intensity of her feeling on the matter, according to the PM, is revealing.

Such is Mr Cameron's schedule over the next few days it will be a squeak to fit in a face-to-face apology, but one imagines he will find the time. After the debate on British air strikes against IS in Iraq in the Commons today, he will be heading to Birmingham for his party's annual conference.

How the Prime Minister must be looking forward to Brum. He has saved the Union, after all, and can reasonably expect to be crowd-surfing the waves of adulation awaiting him in the West Midlands. There are no more polls to cause him stomach ulcers. The road to victory has been taken and now the victor can receive his spoils. But perhaps not so fast, Prime Minister. There is many a slip between cup and lip, and on current form Mr Cameron ought to be wearing a bib at all times.

The first sign of a mess to come surfaced when he stood outside Downing Street in the first light of September 19 and proclaimed that there should be English votes for English laws. With Scots voters expecting him to devote his full attention to the prompt handing over of new powers to Holyrood, as promised days before, this was the political equivalent of pulling a cold, dead rabbit out of a hat.

Linking more powers to Scotland to less power for Scottish (Labour) MPs at Westminster was the kind of wizard wheeze one imagines they used to dream up at Bullingdon Club dinners. Scupper future Labour governments? Cheers. Bring Ukip voters back into the Tory fold? Delicious. Get one over on Gordon? Pop that champagne now. At a time when cool, calm statesmanship was called for, this was a rush of blood to the head stuff, the kind of swashbuckling behaviour that has earned Mr Cameron his Flashman nickname.

Many have come forward to point out the errors in Mr Cameron's thinking but few more elegantly than his old tutor at Oxford, Vernon Bogdanor. Writing in the Guardian yesterday, Professor Bogdanor called the English votes for English laws idea incoherent, misguided, and logically absurd. The Barnett formula, under which Scotland receives a percentage of UK expenditure, meant it was simply "not possible to separate English matters from Scottish" at Westminster.

"Asymmetry is the price England pays to keep Scotland within the Union," he wrote, with the solution not separatism at Westminster but more devolution to England's local authorities.

Mr Cameron received a first in his PPE degree, so one can assume he is aware of the pitfalls associated with his English votes for English laws notion. There is a reason no-one has answered the West Lothian question in the 37 years since Tam Dalyell first posed it. One could give an answer that references Bagehot and hints of the delicate checks and balances required to make Britain's unwritten constitution work, but the short answer is that it is not worth the faff it would take to sort out formally and definitively.

But let us get real here, as Bagehot never said. Mr Cameron did not raise the matter of English votes for English laws because he has a raging desire to correct a constitutional anomaly, or because he was handing powers to the Scots in such quantities as to make it inevitable that he would have to placate the rest of the UK.

He loaded his blunderbuss to shoot the fox that goes by the name of Ukip. The fox that is prowling round henhouses in the Tory-voting shires and suburbs. The fox that keeps Tory MPs, even ones with decent majorities, waking up in a cold sweat each night. Those same Tory MPs are growing more fractious by the day, wondering what they will say on the doorsteps if constituents accuse them of giving too much to the Scots.

He should be asking himself, however, whether that will be an issue come the next General Election. Scotland is not a button Ukip politicians are keen on pressing for long. For them, it is all about Europe, Europe, Europe, immigration and all.

Scotland was, and is, a passing distraction; or at least it will be until the moment Ukip politicians realise that they need votes in the north if they are to get their way in any in-out EU referendum. The way for Mr Cameron to win back wavering Tory voters is not by going further rightwards and bashing Scots, but by luring potential Ukip supporters back to the centre ground.

There is another reason why Mr Cameron should not in his most feverish, fox-strewn dreams think of going back on his promise to Scottish voters. Although it was doubtless not designed with this in mind, the tripartite pledge from the Liberal Democrats, Tories and Labour came with a triple-lock guarantee.

Lock one: the referendum itself. Lock two: the General Election of 2015. Lock three: the Holyrood elections of 2016. Failure at any point to make good on promises made will automatically bring consequences. If pollsters gave Mr Cameron stomach ulcers, wait till he encounters a Scotsman or woman with a grievance.

Voters in general take the utmost exception to any notion that they have been duped. Just ask Nick Clegg. When it comes to the tripartite vow there can be no ifs, buts and contingencies. Voters outwith Scotland, regardless of what Mr Cameron's most determined and radical lieutenants might think, would be equally likely to take a dim view of any backsliding. You don't have to be Welsh to disapprove of a politician welshing on a deal.

Plenty to think about, then, as the PM dots the i's and finesses the references to Mrs T in his leader's speech in Birmingham. As long as he remembers that rebellious Scots are there to be schmoozed rather than crushed, he will do just fine.