| From: | Fujii Masao <fujii(at)postgresql(dot)org> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: doc: clarify aliasing of VALUES in FROM clauses |
| Date: | 2026-09-01 13:53:35 |
| Message-ID: | E1x1Ove-000000032sQ-1Tb3@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
doc: clarify aliasing of VALUES in FROM clauses
The VALUES reference page said that an AS clause was required when
VALUES is used in a FROM clause. This was imprecise because AS is
optional when specifying an alias.
In v14 and v15, a table alias is still required in this case, so state
that explicitly instead. In v16 and later, commit bcedd8f5fce made table
aliases for subqueries in FROM clauses optional, so state that the
table alias is optional there. In all branches, continue to recommend
explicit column aliases as good practice.
Backpatch to all supported versions.
Author: Ian Barwick <barwick(at)gmail(dot)com>
Reviewed-by: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Reviewed-by: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Discussion: https://postgr.es/m/CAB8KJ=jrvZdNLLhYSiCgbjLTz2LKEjYw+-HVQkaF+kgk61KtHA@mail.gmail.com
Backpatch-through: 14
Branch
------
REL_14_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/03851df1105da45350e6d8db20d099299b27428c
Modified Files
--------------
doc/src/sgml/ref/values.sgml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2026-09-01 16:17:20 | pgsql: Handle XmlExpr more honestly in clauses.c. |
| Previous Message | Fujii Masao | 2026-09-01 13:53:24 | pgsql: doc: clarify aliasing of VALUES in FROM clauses |