From the "SQL is verbose" department, WINDOW RANGE specifications

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: From the "SQL is verbose" department, WINDOW RANGE specifications
Date: 2017-10-30 23:56:50
Message-ID: CAKFQuwYahXM1kzRoDonPNeBqdkiLsXuBiOFmhaeZubXox_ThCw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Browse pgsql-general by date

  From Date Subject
Next Message Ivan Voras 2017-10-31 06:50:51 Re: Roles inherited from a role which is the owner of a database can drop it?
Previous Message Tom Lane 2017-10-30 23:21:51 Re: Make "(composite).function_name" syntax work without search_path changes?