Multiple window definitions

Started by PG Bug reporting formover 6 years ago2 messagesdocs
Jump to latest
#1PG Bug reporting form
noreply@postgresql.org

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/11/sql-select.html
Description:

According to the spec:

[ WINDOW window_name AS ( window_definition ) [, ...] ]

So the ... means I can have more than one named window. But I can't make
this work on 11.5.

Please either explain how to make it work (perhaps with an example) or if
it's not supported remove the [, ...]

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: PG Bug reporting form (#1)
Re: Multiple window definitions

PG Doc comments form <noreply@postgresql.org> writes:

According to the spec:
[ WINDOW window_name AS ( window_definition ) [, ...] ]
So the ... means I can have more than one named window. But I can't make
this work on 11.5.

It's supposed to be WINDOW w1 AS (...), w2 AS (...), ...
ie don't repeat the WINDOW keyword.

If that wasn't the issue, you need to show more specifically what
you tried.

I agree that the syntax definition isn't terribly precise, but
people don't seem to have trouble with the very comparable
rules for, say, FROM or GROUP BY.

regards, tom lane