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

Laurenz Albe <laurenz.albe@cybertec.at>

From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Stefan Keller <sfkeller@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2019-01-28T09:31:28Z
Lists: pgsql-hackers
Stefan Keller wrote:
> Pls. try to give DUAL a better name, since it's IMHO neither
> self-explaining nor correct.

I agree with the sentiment.
On the other hand, people who migrate from Oracle might be happy if
there is a DUAL table that allows them to migrate some of their
statements unmodified.

I don't know if that is a good enough argument, though. 
Currently there is "orafce" which provides DUAL, and it might be
good enough if it defines DUAL as a view on DUMMY.

Yours,
Laurenz Albe



Commits

  1. In the planner, replace an empty FROM clause with a dummy RTE.

  2. Fix jit compilation bug on wide tables.