[GENERAL] From the "SQL is verbose" department, WINDOW RANGE specifications - Mailing list pgsql-general

From David G. Johnston
Subject [GENERAL] From the "SQL is verbose" department, WINDOW RANGE specifications
Date
Msg-id CAKFQuwYahXM1kzRoDonPNeBqdkiLsXuBiOFmhaeZubXox_ThCw@mail.gmail.com
Whole thread Raw
List pgsql-general
The default range specification is:

RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW

It seems like a common second choice is to want:

RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING

Why did they have to make something so common take 49 characters that, for seldom-using users, is nearly impossible to remember?

The following would seem to suffice:

{ RANGE | ROWS } ALL

I'd be happy to use non-portable syntax here...

As an aside, I'd vote to add the entire WINDOW syntax specification to the Synopsis.  The main parameters section can remain as-is in order to aid in reading comprehension - but having to search out the parameters area just to remind oneself of the extremely verbose syntax is a bit annoying.  All of the other sections are represented in both the main synopsis and the parameters in this manner and I think WINDOW doesn't warrant an exception (especially vis-a-via both the from_item and grouping_element specifications).

David J.

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: [GENERAL] Make "(composite).function_name" syntax work without search_path changes?
Next
From: Ivan Voras
Date:
Subject: Re: [GENERAL] Roles inherited from a role which is the owner of adatabase can drop it?