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 <[email protected]>
Reviewed-by: Laurenz Albe <[email protected]>
Reviewed-by: Fujii Masao <[email protected]>
Discussion: 
https://postgr.es/m/CAB8KJ=jrvzdnllhysicgbjltz2lkejyw+-hvqkaf+kgk61k...@mail.gmail.com
Backpatch-through: 14

Branch
------
REL_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/4aa640a395cab42012fd26570dafca1001a6debd

Modified Files
--------------
doc/src/sgml/ref/values.sgml | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)

Reply via email to