Re: [HACKERS] Windowing Function Patch Review -> ROW_NUMBER without ORDER BY

2008-11-10 Thread David Rowley
Hitoshi Harada wrote: > > The spec says: "The ROW_NUMBER function computes the sequential row > number, > > starting with 1 (one) for the first row, of the row within its window > > partition according to the window ordering of the window." > > > > I'm just not sure if we should block this or not.

Re: [HACKERS] Windowing Function Patch Review -> ROW_NUMBER without ORDER BY

2008-11-09 Thread Hitoshi Harada
2008/11/10 David Rowley <[EMAIL PROTECTED]>: > I've been trying to think of a use case for using ROW_NUMBER() with no ORDER > BY in the window clause. > > Using the example table I always seem to be using, for those who missed it > in other threads. > > create table employees ( > id INT primary ke

Re: [HACKERS] Windowing Function Patch Review -> ROW_NUMBER without ORDER BY

2008-11-09 Thread Vladimir Sitnikov
> > > I see this as a greate feature. I would treat ranking functions without explicit order by clause as a feature rather than a bug. However, I believe, in most cases optimizer will avoid additional sort when possible, thus an "order by" in a windowing clause would not cause any performance degr

Re: [HACKERS] Windowing Function Patch Review -> ROW_NUMBER without ORDER BY

2008-11-09 Thread Andreas Joseph Krogh
On Sunday 09 November 2008 22:35:01 David Rowley wrote: > I've been trying to think of a use case for using ROW_NUMBER() with no ORDER > BY in the window clause. > > Using the example table I always seem to be using, for those who missed it > in other threads. > > create table employees ( > id

[HACKERS] Windowing Function Patch Review -> ROW_NUMBER without ORDER BY

2008-11-09 Thread David Rowley
I've been trying to think of a use case for using ROW_NUMBER() with no ORDER BY in the window clause. Using the example table I always seem to be using, for those who missed it in other threads. create table employees ( id INT primary key, name varchar(30) not null, department varchar(30)