Re: using window functions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Daniel Manesajian <manesaj(at)hotmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: using window functions
Date: 2009-03-17 03:58:25
Message-ID: 860.1237262305@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Daniel Manesajian <manesaj(at)hotmail(dot)com> writes:
> When I try a simple query "select avg(my_int) over (order by my_int rows unbounded preceding) order by 1;" I get an error:
> ERROR: syntax error at or near "over"

You sure you're actually talking to the 8.4 server? Because that's
exactly what you'd get if you tried to feed the command to an older
release.

You might in fact need a newer snapshot too. The main window functions
commit went in 2008-12-28 but I recall that there were some mop-up fixes
afterwards. At best a 1-Jan snapshot would be a bit unstable.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message V S P 2009-03-17 04:16:00 [Q] ODBC Decimal(19,6)
Previous Message Daniel Manesajian 2009-03-17 03:33:43 using window functions