Re: unclear syntax explanation for multiple window definitions in a SELECT query
От | David G. Johnston |
---|---|
Тема | Re: unclear syntax explanation for multiple window definitions in a SELECT query |
Дата | |
Msg-id | CAKFQuwaGrwFF0Y234+n7wXK0FtWyO5=hucD9Qd6MpCrJKiqT7w@mail.gmail.com обсуждение исходный текст |
Ответ на | unclear syntax explanation for multiple window definitions in a SELECT query (PG Doc comments form <noreply@postgresql.org>) |
Ответы |
Re: unclear syntax explanation for multiple window definitions in a SELECT query
|
Список | pgsql-docs |
On Thu, Feb 16, 2023 at 5:13 AM PG Doc comments form <noreply@postgresql.org> wrote:
The following documentation comment has been logged on the website:
Page: https://www.postgresql.org/docs/15/sql-select.html
Description:
The syntax documentation for SELECT in SQL COMMANDS section is unclear in
explaining how to use multiple window definitions. It's easy to read it and
believe that multiple WINDOW keywords, one for each definition, are correct,
which is not the case.
See this stackoverflow question and answer on point:
https://stackoverflow.com/questions/59651529/multiple-named-windows-in-a-postgres-query
This is how we've chosen to document this kind of grammar and I don't see a compelling reason to revisit that decision on the basis of this report. I could consider some additional wording regarding "each clause keyword only ever appears once in a given (sub)query" though that seems almost self-evident as part of the learning of SQL. The fact that you write WINDOW and then a comma-separated listing of names plus definitions is how that syntax diagram is read, just like with WITH, FROM, and GROUP BY clauses in the same diagram.
David J.
В списке pgsql-docs по дате отправления: