Re: Making the subquery alias optional in the FROM clause - Mailing list pgsql-hackers

From Isaac Morland
Subject Re: Making the subquery alias optional in the FROM clause
Date
Msg-id CAMsGm5dPo=7xY_1pSo6yBjJrJt5EjCdHMkitXD7j6jaJ=uw0WQ@mail.gmail.com
Whole thread Raw
In response to Re: Making the subquery alias optional in the FROM clause  (Julien Rouhaud <rjuju123@gmail.com>)
Responses Re: Making the subquery alias optional in the FROM clause  (Julien Rouhaud <rjuju123@gmail.com>)
List pgsql-hackers
On Mon, 27 Jun 2022 at 11:12, Julien Rouhaud <rjuju123@gmail.com> wrote:
More generally, I'm -0.5 on the feature.
I prefer to force using SQL-compliant queries, and also not take bad
habits.

As to forcing SQL-complaint queries, that ship sailed a long time ago: Postgres allows but does not enforce the use of SQL-compliant queries, and many of its important features are extensions anyway, so forcing SQL compliant queries is out of the question (although I could see the utility of a mode where it warns or errors on non-compliant queries, at least in principle).

As to bad habits, I'm having trouble understanding. Why do you think leaving the alias off a subquery is a bad habit (assuming it were allowed)? If the name is never used, why are we required to supply it?

pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Lazy JIT IR code generation to increase JIT speed with partitions
Next
From: Alvaro Herrera
Date:
Subject: Re: SYSTEM_USER reserved word implementation