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

From: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Cc: Stefan Keller <sfkeller(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: "SELECT ... FROM DUAL" is not quite as silly as it appears
Date: 2019-01-28 11:38:15
Message-ID: CAKJS1f9KW2vxthuk4-CaH0ao+be_rNyafxnwaT-9-H-vKgqUCQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 28 Jan 2019 at 22:31, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> wrote:
>
> 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.

hmm. You both know the table of that name exists only as part of a
regression test, right? It'll just exist for a handful of
milliseconds during make check.

My comment about the poorly named table may have been a bit pedantic
as far as what a table in a test should be called, but I also felt a
bit of an urge to make a little bit of fun about having a table named
dual which always has just a single row. Knowing the reasons for
Oracle's naming of the table helps explain why they ended up with the
poorly named table. I didn't think that warranted us doing the same
thing, even if it's just a short-lived table inside a regression test.

--
David Rowley http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2019-01-28 11:57:16 Re: WIP: Avoid creation of the free space map for small tables
Previous Message David Rowley 2019-01-28 11:27:27 Re: Delay locking partitions during query execution