On Fri, 2026-07-24 at 18:12 +0900, Ian Lawrence Barwick wrote:
> the VALUES documentation [*] still claims an AS clause is required
> when VALUES is
> used in a FROM clause. This has not been the case since PostgreSQL 16
> (commit bcedd8f).
> 
> [*] https://www.postgresql.org/docs/current/sql-values.html
> 
> Attached patch reworks the offending sentence from:
> 
> > Note that an AS clause is required when VALUES is used in a FROM clause, 
> > just
> > as is true for SELECT. It is not required that the AS clause specify names 
> > for
> > all the columns, but it's good practice to do so.
> 
> to:
> 
> > If VALUES is used in a FROM clause, it's not necessary to have an AS clause
> > specifying names for each column, but it's good practice to do so.

This should be changed, but I think the wording could be better:

  Note that if <command>VALUES</command> is used in a <literal>FROM</literal>
  clause, it is not necessary to specify an <literal>AS</literal> clause, but
  it is good practice to do so.

Otherwise people might think that you need to specify an AS clause, but
you can omit specifying the column names in the AS clause.

Yours,
Laurenz Albe


Reply via email to