Re: "SELECT ... FROM DUAL" is not quite as silly as it appears - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: "SELECT ... FROM DUAL" is not quite as silly as it appears
Date
Msg-id CAEepm=0W_ycqVAFm8Un04JyBYYfM-xXoV64JS=8A6t2_s+rwNw@mail.gmail.com
Whole thread Raw
In response to "SELECT ... FROM DUAL" is not quite as silly as it appears  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Fri, Mar 16, 2018 at 4:27 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> We've long made fun of Oracle(TM) for the fact that if you just want
> to evaluate some expressions, you have to write "select ... from dual"
> rather than just "select ...".  But I've realized recently that there's
> a bit of method in that madness after all.

We can still make fun of that table.  Apparently it had two rows, so
you could double rows by cross joining against it, but at some point
one of them went missing, leaving a strange name behind.  Source:
https://en.wikipedia.org/wiki/DUAL_table#History

-- 
Thomas Munro
http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: [RFC] Removing "magic" oids
Next
From: Tom Lane
Date:
Subject: Re: [RFC] Removing "magic" oids