Re: Make subquery alias optional in FROM clause

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Pantelis Theodosiou <ypercube(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Nico Williams <nico(at)cryptonector(dot)com>, Bernd Helmle <mailings(at)oopsware(dot)de>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Make subquery alias optional in FROM clause
Date: 2017-02-24 07:25:38
Message-ID: CA+TgmobCrKvjvRruwVz0QOpuNEMh7fqGxcY+fkP=jiUwo5g6XQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Feb 23, 2017 at 4:08 PM, Pantelis Theodosiou <ypercube(at)gmail(dot)com> wrote:
> Question: Will the patch be removed if and when Oracle decides to be
> compatible with the standard and forbids non-aliased derived tables?
>
> (I know it's a rather theoretical question. Unlikely that Oracle breaks
> backwards compatibility on that.)

Even if they did, so what?

First of all, our project's aim is not to copy Oracle slavishly but to
build a good database. Sometimes that involves making things work in
ways similar to Oracle and sometimes it doesn't. For example, I have
no urge to get rid of transactional DDL just because Oracle doesn't
have it. I have no feeling that NULL should behave in the completely
unprincipled way that it does in Oracle. And I don't think that
PostGIS needs to try to go be more like Oracle Spatial.

Secondly, extensions to the standard that let reasonable things work
which the standard doesn't permit are generally a good idea. We don't
want to let things work that really deserve to fail - for example
because the meaning is ambiguous - nor do we want to implement
standard syntax with non-standard semantics. However, neither of
those problems exists for this case. I don't see the point in making
things fail that could just as easily do what was wanted; that seems
pedantic. I don't think it's only Oracle that allows omitting the
alias; I think there are a number of other systems that behave
similarly.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2017-02-24 07:34:01 Re: Make subquery alias optional in FROM clause
Previous Message Andres Freund 2017-02-24 07:25:16 Re: Poor memory context performance in large hash joins