That reminds me of a project I had once where the old system had a limit of 256 columns per table. The schema was dreadful - full of tables with sets of columns <name>1, <name>2, <name>3, …
It hit the 256 limit pretty early on so by the time it came to transfer the data there were sets of tables <table>1, <table>2, <table>3, … I found one entity with over 1200 columns.
The best part was the new system had to match exactly the schema for the old system which makes the transfer relatively easy but … sobs… sadly.
Wow, first I’ve heard of using a temporary column at all… but I guess if you’re migrating data it makes it a bit more convenient.
A better solution, based on writable CTEs, is described in the comments under the blog post.