pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Johnston <polobo@yahoo.com>
To: pgsql-bugs@postgresql.org
Subject: Re: BUG #9010: partition by overrides order by in window functions
Date: Tue, 28 Jan 2014 14:34:37 -0800 (PST)
Message-ID: <1390948477557-5789377.post@n5.nabble.com> (raw)
In-Reply-To: <20140128175229.8089.55168@wrigleys.postgresql.org>
References: <20140128175229.8089.55168@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

markella.skempri wrote
> 1	2011-08-20	2011-08-21	1
> 1	2011-08-21	2011-08-27	6
> 1	2011-08-27	2011-08-28	1
> 1	2011-08-28	2011-08-29	1
> 1	2011-08-29	2011-08-30	1
> 
> 1	2011-08-20	2011-08-21	1
> 1	2011-08-27	2011-08-28	1	7
> 1	2011-08-21	2011-08-27	6	1
> 1	2011-08-28	2011-08-29	1	1
> 1	2011-08-29	2011-08-30	1	2

Yes, partitioning occurs before ordering.  The syntax itself suggests that.  

Can you explain why you expect the 27-28 row to belong to the "first" group
and not the "third"?

If that is a typo then you are looking for contiguous blocks with the same
gap-size.  Once you've identified those blocks you can then partition on
them and performing your row_number.

David J.




--
View this message in context: http://postgresql.1045698.n5.nabble.com/BUG-9010-partition-by-overrides-order-by-in-window-functions...
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (3+ messages)

Message-ID: <1390948477557-5789377.post@n5.nabble.com>
Permalink:  ../1390948477557-5789377.post@n5.nabble.com/
Also on:    postgresql.org/message-id/1390948477557-5789377.post@n5.nabble.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: polobo@yahoo.com
  Subject: Re: BUG #9010: partition by overrides order by in window functions
  In-Reply-To: <1390948477557-5789377.post@n5.nabble.com>
  References: <20140128175229.8089.55168@wrigleys.postgresql.org> <1390948477557-5789377.post@n5.nabble.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox