I don't like discussing the spec, however it looks like we don't have a choice.
Does that mean that it is illegal to use ROW_NUMBER with any other kind of bound?
This is exactly how I read the following in the spec:
If <rank function type> or ROW_NUMBER is specified, then:
b) The window framing of WDX shall not be present.
In other words, all rank functions+row_number cannot have framing.
I believe we have a validation exactly for this reason:
RankWithFrame=ROW/RANGE not allowed with RANK or DENSE_RANK functions
Well, it makes sense adding ROW_NUMBER there as well (or parametrize the error message with actual name of the function).
Ok, we continue:
ROW_NUMBER() OVER WNS is equivalent to the <window function>: COUNT (*) OVER (WNS1 ROWS UNBOUNDED PRECEDING)
I read this as follows: whenever you see ROW_NUMBER() OVER WNS, you take window specification (remember, it does not contain framing), overlay it with ROWS UNBOUNDED PRECEDING, and replace ROW_NUMBER with COUNT(*).
PostgreSQL just silently ignores ROWS BETWEEN 3 PRECEDING AND 2 FOLLOWING in row_number/rank/dense_rank.
Oracle does not allow framing for rank/row_number.