Make subquery aliases optional in the FROM clause.
authorDean Rasheed <dean.a.rasheed@gmail.com>
Wed, 20 Jul 2022 08:29:42 +0000 (09:29 +0100)
committerDean Rasheed <dean.a.rasheed@gmail.com>
Wed, 20 Jul 2022 08:29:42 +0000 (09:29 +0100)
commitbcedd8f5fce0b69970cf0cee7bca560833d05869
treec37888d24735977b7a0463b0277c1cbe459ac69f
parent1caf915ff31e91031f0a0b8e1016df2b59d6f9de
Make subquery aliases optional in the FROM clause.

This allows aliases for sub-SELECTs and VALUES clauses in the FROM
clause to be omitted.

This is an extension of the SQL standard, supported by some other
database systems, and so eases the transition from such systems, as
well as removing the minor inconvenience caused by requiring these
aliases.

Patch by me, reviewed by Tom Lane.

Discussion: https://postgr.es/m/CAEZATCUCGCf82=hxd9N5n6xGHPyYpQnxW8HneeH+uP7yNALkWA@mail.gmail.com
doc/src/sgml/ref/select.sgml
src/backend/parser/analyze.c
src/backend/parser/gram.y
src/backend/parser/parse_clause.c
src/backend/parser/parse_relation.c
src/backend/utils/adt/ruleutils.c
src/include/parser/parse_node.h
src/interfaces/ecpg/preproc/ecpg.addons
src/test/regress/expected/subselect.out
src/test/regress/sql/subselect.sql