Skip site navigation (1) Skip section navigation (2)

window function docs

From: "Robert Haas" <robertmhaas(at)gmail(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: window function docs
Date: 2008-12-29 14:43:58
Message-ID: 603c8f070812290643g23344667p48b58b4fefea75ba@mail.gmail.com (view raw or flat)
Thread:
Lists: 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 another of 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 to be 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

Responses

pgsql-hackers by date

Next:From: Peter EisentrautDate: 2008-12-29 14:48:29
Subject: Re: Several tags around PostgreSQL 7.1 broken
Previous:From: Kurt RoeckxDate: 2008-12-29 14:24:16
Subject: Re: Gcc 4.4 causes abort in plpython.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group