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

From: Ian Lawrence Barwick <barwick(at)gmail(dot)com>
To: Fujii Masao <masao(dot)fujii(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-28 06:07:58
Message-ID: CAB8KJ=g4YJ8R=Gv=HTjooQ4y=StgRnAur79xWavZ7+S=gXKabQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2026年8月21日(金) 23:27 Fujii Masao <masao(dot)fujii(at)gmail(dot)com>:
>
> 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?

Good point! Patch attached for v14/v15.

> + 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.

Yes, I think we can keep it simple here, the main objective is to correct
the inaccuracy, not write an SQL style guide ;).

Regards

Ian Barwick

Attachment Content-Type Size
v1-0001-doc-clarify-VALUES-usage-in-FROM-clause-Pg14-Pg15.patch text/x-patch 1.6 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Vaibhav Dalvi 2026-08-28 06:09:06 Re: [PATCH] Add support for INSERT ... SET syntax
Previous Message Chao Li 2026-08-28 06:04:15 Re: REPACK (CONCURRENTLY) fails when replica identity index is dropped