public inbox for [email protected]
help / color / mirror / Atom feedROW or RANGE not optional in range specification
2+ messages / 2 participants
[nested] [flat]
* ROW or RANGE not optional in range specification
@ 2015-03-31 22:19 David G. Johnston <[email protected]>
0 siblings, 1 reply; 2+ messages in thread
From: David G. Johnston @ 2015-03-31 22:19 UTC (permalink / raw)
To: 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.
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: ROW or RANGE not optional in range specification
@ 2015-03-31 23:52 Tom Lane <[email protected]>
parent: David G. Johnston <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2015-03-31 23:52 UTC (permalink / raw)
To: David G. Johnston <[email protected]>; +Cc: pgsql-docs
"David G. Johnston" <[email protected]> writes:
> 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
Yup, you're right. Thanks for spotting that!
regards, tom lane
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2015-03-31 23:52 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-03-31 22:19 ROW or RANGE not optional in range specification David G. Johnston <[email protected]>
2015-03-31 23:52 ` Tom Lane <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox