Re: "SELECT ... FROM DUAL" is not quite as silly as it appears

From: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: "SELECT ... FROM DUAL" is not quite as silly as it appears
Date: 2018-10-14 22:11:21
Message-ID: CAEepm=0W_ycqVAFm8Un04JyBYYfM-xXoV64JS=8A6t2_s+rwNw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Mar 16, 2018 at 4:27 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-10-14 22:34:50 Re: [RFC] Removing "magic" oids
Previous Message Andres Freund 2018-10-14 22:09:23 Re: [RFC] Removing "magic" oids