ROW or RANGE not optional in range specification

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: "pgsql-docs(at)postgresql(dot)org" <pgsql-docs(at)postgresql(dot)org>
Subject: ROW or RANGE not optional in range specification
Date: 2015-03-31 22:19:14
Message-ID: CAKFQuwYJk-hHqzOC_QFREZzurfqEAKXvmNk71tYOTTcrZGY_KQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

http://www.postgresql.org/docs/devel/static/sql-select.html

Either I'm confused about the syntax description rules or the documentation
for this aspect of window definitions is wrong.

The expression:

[ RANGE | ROWS ] BETWEEN frame_start AND frame_end

means that the specification of range or rows is optional - but that
doesn't appear to be the case...

The documentation should read:

{ RANGE | ROWS } BETWEEN frame_start AND frame_end

Same goes for the bare frame_start specification preceding the between
version.

The bare version looks funny without tag but "ORDER BY idx BETWEEN 5
PRECEDING AND CURRENT ROW" isn't obviously wrong until you get a syntax
error...

David J.

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Tom Lane 2015-03-31 23:52:15 Re: ROW or RANGE not optional in range specification
Previous Message Magnus Hagander 2015-03-17 11:08:29 Re: [DOCS] dtrace pgfoundry link