2008/12/30 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> "Hitoshi Harada" <umi(dot)tanuki(at)gmail(dot)com> writes:
>> And surveying sgml docs, I found this is not correct.
>> + default framing behavior, which is equivalent to the framing clause
>> + <literal>ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW</>.
>> the default frame with ORDER BY clause is RANGE BETWEEN UNBOUNDED
>> PRECEDING AND CURRENT ROW, as aggregates perform rows peer to the
>> current row.
> What is the difference? AFAICS the RANGE and ROWS keywords ought to be
> equivalent if you are not specifying "expression PRECEDING" or
> "expression FOLLOWING".
The difference is that RANGE ... CURRENT ROW contains all peers of the
current row, while ROWS ... CURRENT ROW doesn't contain them but the
current row itself only. See 7.11 rule 5-b.
In response to
pgsql-hackers by date
|Next:||From: Tom Lane||Date: 2008-12-29 18:00:15|
|Subject: Re: TODO items for window functions |
|Previous:||From: Michael Meskes||Date: 2008-12-29 17:42:43|
|Subject: Re: ecpg regression test failures caused by window functions patch|