On Sun, 2004-07-04 at 19:57, Tom Lane wrote: > Anyone who needs this has always been able to make it trivially > (though you once had to invent a random column name for the one > required column).
In Oracle, DUAL is treated specially internally for performance reasons, since it is so heavily used. Making a table with the same name would probably be a serviceable but under-performing migration mechanism. > Does anyone have the foggiest idea why they named it DUAL? Doesn't > seem a very mnemonic choice to me... There is no real authoritative answer to this, and it has long been a mystery. One semi-official version of the story is that it was originally an internal table with two rows used for some operations. How that became a single row scratch pad table is a mystery, since even the Oracle old-timers I know have no recollection of it ever being anything but what it currently is. Others claim it is a reference to 1x1 matrix operations. There are a number of different stories that people have heard -- I've heard three or four completely unrelated explanations from long-time Oracle folks -- and most of them are plausible. It is one of those things we will probably never know. Whatever its historical purpose, DUAL has been so pervasively used in the Oracle universe for so long that giving it a better name would break virtually every Oracle application in existence. It is an institution unto itself. j. andrew rogers ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster