public inbox for [email protected]  
help / color / mirror / Atom feed
From: David G. Johnston <[email protected]>
To: [email protected] <[email protected]>
Subject: ROW or RANGE not optional in range specification
Date: Tue, 31 Mar 2015 15:19:14 -0700
Message-ID: <CAKFQuwYJk-hHqzOC_QFREZzurfqEAKXvmNk71tYOTTcrZGY_KQ@mail.gmail.com> (raw)
List-Unsubscribe: <mailto:[email protected]?body=unsub%20pgsql-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.


view thread (2+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected]
  Subject: Re: ROW or RANGE not optional in range specification
  In-Reply-To: <CAKFQuwYJk-hHqzOC_QFREZzurfqEAKXvmNk71tYOTTcrZGY_KQ@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox