Re: Pg, Netezza, and... Sybase? - Mailing list pgsql-general

From David Johnston
Subject Re: Pg, Netezza, and... Sybase?
Date
Msg-id 01c801cda016$a3d98a40$eb8c9ec0$@yahoo.com
Whole thread Raw
In response to Pg, Netezza, and... Sybase?  (yary <not.com@gmail.com>)
Responses Re: Pg, Netezza, and... Sybase?  (yary <not.com@gmail.com>)
List pgsql-general
>
> 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.




pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Thousands of schemas and ANALYZE goes out of memory
Next
From: Moshe Jacobson
Date:
Subject: Re: What's faster? BEGIN ... EXCEPTION or CREATE TEMP TABLE IF NOT EXISTS?