Search Postgresql Archives

Re: Pg, Netezza, and... Sybase?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 
> and indeed that is the exact bug I found in Netezza! "first_value"
> works great, "last_value" has window size 1 unless you also say "rows
> between unbounded preceding and unbounded following".
> 

What Tom said but:

"...has window size 1" is not correct.  The window size is larger but the
returned value is always just going to be the current (last) row so it only
appears to be "size 1" superficially.

The query's frame/range/window specification is independent of the functions
that use the window.

If you are confused as to what is currently in the frame specification you
should use something like

ARRAY_AGG(...) OVER (...) 

To capture the relevant frame data into a single value.

David J.




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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux