window function docs - Mailing list pgsql-hackers

From Robert Haas
Subject window function docs
Date
Msg-id 603c8f070812290643g23344667p48b58b4fefea75ba@mail.gmail.com
Whole thread Raw
Responses Re: window function docs  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
List pgsql-hackers
Section 7.2.4 of the docs, third paragraph, currently reads:

> Currently, use of window functions always forces sorting, and so the query output will be ordered according to one or
anotherof the window functions' PARTITION BY/ORDER
 
> BY clauses. It is not recommendable to rely on this, however. Use an explicit top-level ORDER BY clause if you want
tobe sure the results are sorted in a particular way.
 

Recommendable is not a commonly used word in English, and I think the
rest of the paragraph can be tightened up a bit.  Maybe something like
this:

Currently, use of window functions always forces sorting, so the query
output will be ordered according to one or another of the window
functions' PARTITION BY/ORDER BY clauses.  However, this may change in
the future, so you should use an explicit top-level ORDER BY clause if
you want the results sorted in a particular way.

Also, section 3.5 of the docs does not references any of the other
sections that talk about window functions (7.2.4, 4.2.8, 9.19), and
7.2.4 does not reference 9.19 either.  I'm not sure what the policy on
cross-references but it took me a bit to find everything.

...Robert


pgsql-hackers by date:

Previous
From: Kurt Roeckx
Date:
Subject: Re: Gcc 4.4 causes abort in plpython.
Next
From: Peter Eisentraut
Date:
Subject: Re: Several tags around PostgreSQL 7.1 broken