Thom Brown <thombr...@gmail.com> wrote: > [...] > Having a look around, it looks as if Postgres might be misbehaving. > According to this page, > http://my.safaribooksonline.com/0596004818/sqlnut2-CHP-4-SECT-3, the ORDER > BY in the window function's clause shouldn't be having this ordering effect:
> "Furthermore, the order within these groups is defined by an ordering > clause, but that order only affects function evaluation, and has no effect > on the order in which rows are returned by the query." > The behaviour is unexpected from my perspective, but obviously there are > workarounds. Is anyone able to confirm any of this? AFAIR, others have already pointed out that without an "OR- DER BY" clause PostgreSQL can return the result set in *any* "order" it deems fit. So why don't you use one? Tim -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql