On Sat, 2007-01-20 at 14:20 +, Simon Riggs wrote:
> On Sat, 2007-01-20 at 23:54 +1100, Gavin Sherry wrote:
> > Windows are slightly more complex though. As you
> > probably know, there are two ways of specifying the window frame: by an
> > absolute number of rows (ROWS N PRECEDING, for example
On Sat, 2007-01-20 at 13:36 +, Gregory Stark wrote:
> "Alvaro Herrera" <[EMAIL PROTECTED]> writes:
>
> > Simon Riggs wrote:
> >
> >> I'm working on modifying Tuplestore that will allow you to store the
> >> last N tuples, rather than all previous input. This is specifically
> >> designed to al
On Sat, 2007-01-20 at 23:54 +1100, Gavin Sherry wrote:
> > > Yep. I was thinking about this all morning. I think I've over engineered
> > > the problem in my head. Window function input just looks like a slightly
> > > more complex distinct aggregate input. I'll think on it more though.
> >
> > I'
On Sat, 20 Jan 2007, Gregory Stark wrote:
> However for RANGE UNBOUNDED PRECEDING we can apply a different plan. Keep the
> state variable for each window aggregate around for the entire time. For each
> record apply the state transition function then apply the FINAL function to
> generate the res
"Gavin Sherry" <[EMAIL PROTECTED]> writes:
> Wow. What a coincidence! Windows are slightly more complex though. As you
> probably know, there are two ways of specifying the window frame: by an
> absolute number of rows (ROWS N PRECEDING, for example); or, by a 'range'
> (RANGE N PRECEDING), where
Gavin,
I'm also interested in the topic, but right now I am wondering if
rank() function is a reserved name ? We're working on built-in
tsearch2 for 8.3 release and we already have rank() function.
Oleg
On Sun, 21 Jan 2007, Gavin Sherry wrote:
On Sat, 20 Jan 2007, Tom Lane wrote:
Gavin She
"Alvaro Herrera" <[EMAIL PROTECTED]> writes:
> Simon Riggs wrote:
>
>> I'm working on modifying Tuplestore that will allow you to store the
>> last N tuples, rather than all previous input. This is specifically
>> designed to allow Merge Join to do Mark/Restore without materializing
>> the whole s
On Sat, 20 Jan 2007, Tom Lane wrote:
> Gavin Sherry <[EMAIL PROTECTED]> writes:
> > We want to answer the following: for each employee: what is their rank in
> > terms of salary and what is their rank in terms of age. This query
> > answers that:
>
> > select empno, rank() over (order by salary) a
On Sat, 20 Jan 2007, Simon Riggs wrote:
> On Sat, 2007-01-20 at 15:58 +1100, Gavin Sherry wrote:
> > On Fri, 19 Jan 2007, Tom Lane wrote:
> >
> > > Gavin Sherry <[EMAIL PROTECTED]> writes:
> > > > On Fri, 19 Jan 2007, Tom Lane wrote:
> > > >> Er, what primary key would that be exactly? And even i
Simon Riggs wrote:
> I'm working on modifying Tuplestore that will allow you to store the
> last N tuples, rather than all previous input. This is specifically
> designed to allow Merge Join to do Mark/Restore without materializing
> the whole sort set. This can also be used to materialize Windows
On Sat, 2007-01-20 at 15:58 +1100, Gavin Sherry wrote:
> On Fri, 19 Jan 2007, Tom Lane wrote:
>
> > Gavin Sherry <[EMAIL PROTECTED]> writes:
> > > On Fri, 19 Jan 2007, Tom Lane wrote:
> > >> Er, what primary key would that be exactly? And even if you had a key,
> > >> I wouldn't call joining on i
On Sat, 2007-01-20 at 09:34 +1100, Gavin Sherry wrote:
> On Sat, 19 Jan 2007, Karen Hill wrote:
>
> > Gavin Sherry wrote:
> > > Recenly, I've been researching and putting together a proposal for window
> > > functions.
Good news.
> > Implementing NULLS FIRST and NULLS LAST appears like another
>
Hi,
Tom Lane wrote:
select empno, rank() over (order by salary) as srank,
rank() over (order by age) as arank
from employees order by empno;
Eeek. This seems like the worst sort of action-at-a-distance. How does
rank() know what value it's supposed to report the rank of?
All of these r
Gavin Sherry <[EMAIL PROTECTED]> writes:
> We want to answer the following: for each employee: what is their rank in
> terms of salary and what is their rank in terms of age. This query
> answers that:
> select empno, rank() over (order by salary) as srank,
> rank() over (order by age) as arank
On Fri, 19 Jan 2007, Tom Lane wrote:
> Gavin Sherry <[EMAIL PROTECTED]> writes:
> > On Fri, 19 Jan 2007, Tom Lane wrote:
> >> Er, what primary key would that be exactly? And even if you had a key,
> >> I wouldn't call joining on it trivial; I'd call it expensive ...
>
> > I should have used sligh
Gavin Sherry <[EMAIL PROTECTED]> writes:
> On Fri, 19 Jan 2007, Tom Lane wrote:
>> Er, what primary key would that be exactly? And even if you had a key,
>> I wouldn't call joining on it trivial; I'd call it expensive ...
> I should have used slightly different language. What I meant to say was,
On Sat, 19 Jan 2007, Karen Hill wrote:
> Gavin Sherry wrote:
> > Recenly, I've been researching and putting together a proposal for window
> > functions.
>
> Implementing NULLS FIRST and NULLS LAST appears like another
> challenging step to getting window functions wrapped up. Has your
> research
On Fri, 19 Jan 2007, Tom Lane wrote:
> Gavin Sherry <[EMAIL PROTECTED]> writes:
> > What we want to do is have a kind of 'sub plan' for each aggregate. In
> > effect, the plan might start looking like a directed graph. Here is part
> > of the plan as a directed graph.
>
> >
Stefan Kaltenbrunner wrote:
> Karen Hill wrote:
> > Gavin Sherry wrote:
> >> Recenly, I've been researching and putting together a proposal for window
> >> functions.
> >
> > Implementing NULLS FIRST and NULLS LAST appears like another
> > challenging step to getting window functions wrapped up.
Karen Hill wrote:
> Gavin Sherry wrote:
>> Recenly, I've been researching and putting together a proposal for window
>> functions.
>
> Implementing NULLS FIRST and NULLS LAST appears like another
> challenging step to getting window functions wrapped up. Has your
> research lead you to any ideas
Gavin Sherry wrote:
> Recenly, I've been researching and putting together a proposal for window
> functions.
Implementing NULLS FIRST and NULLS LAST appears like another
challenging step to getting window functions wrapped up. Has your
research lead you to any ideas on what your strategy for NULL
Gavin Sherry <[EMAIL PROTECTED]> writes:
> What we want to do is have a kind of 'sub plan' for each aggregate. In
> effect, the plan might start looking like a directed graph. Here is part
> of the plan as a directed graph.
>GroupAggregate
> /
Recenly, I've been researching and putting together a proposal for window
functions. I have not finished this but when I do, I will post it. A nice
list of examples can be found here[1].
Rather than spend a lot of time talking about the problems window
functions present to the planner and executor
23 matches
Mail list logo