Re: "SELECT ... FROM DUAL" is not quite as silly as it appears
Thomas Munro <thomas.munro@enterprisedb.com>
From: Thomas Munro <thomas.munro@enterprisedb.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2018-10-14T22:11:21Z
Lists: 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
Commits
-
In the planner, replace an empty FROM clause with a dummy RTE.
- 4be058fe9ec5 12.0 landed
-
Fix jit compilation bug on wide tables.
- b238527664ec 12.0 cited