Re: LinuxTag wrapup

From: "J(dot) Andrew Rogers" <jrogers(at)neopolitan(dot)com>
To: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: LinuxTag wrapup
Date: 2004-07-06 17:15:22
Message-ID: 1089134121.21663.23.camel@vulture.corp.neopolitan.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2004-07-06 17:22:35 Re: Error Codes
Previous Message Bruce Momjian 2004-07-06 17:12:44 Re: LinuxTag wrapup