Re: [PATCH] doc: clarify AS requirement when VALUES used in a FROM clause

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Ian Lawrence Barwick <barwick(at)gmail(dot)com>
Cc: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] doc: clarify AS requirement when VALUES used in a FROM clause
Date: 2026-08-21 14:26:57
Message-ID: CAHGQGwHG-qLfpMF5dCxkecht5PQkdYqTvLV53Fd2bc+1=mT0oA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Aug 21, 2026 at 7:06 PM Ian Lawrence Barwick <barwick(at)gmail(dot)com> wrote:
> Revised patch attached.

Thanks for updating the patch!

I was initially thinking this patch should be backpatched to v16, where
commit bcedd8f appeared. However, since an AS clause is optional even
in v14 and v15, while the table alias itself is required there, should
"an AS clause" in the original description be changed to "a table alias"
for v14 and v15 as well?

+ clause, a table alias is optional. Assigning alias names to the columns
+ of the <command>VALUES</command> list is optional, but is good practice.

In queries.sgml, writing a table alias is also described as good
practice according to the SQL standard. So we could mention here that
writing a table alias is good practice as well. But, since this is
already covered in queries.sgml and it seems a bit overkill to repeat
it here, I'm fine with mentioning only assigning alias names to the
columns as good practice.

Thoughts?

Regards,

--
Fujii Masao

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2026-08-21 14:34:03 Re: [PATCH] Fix compilation of nodeMergejoin.c with EXEC_MERGEJOINDEBUG
Previous Message Jan Nidzwetzki 2026-08-21 14:24:42 Re: Many of psql's describe functions bloat cache / waste mem