Iliya Krapchatov wrote:
> select first_value( pk ) OVER ( pkw ) FROM t
> WINDOW pkw AS ( PARTITION BY pk ORDER BY pk RANGE BETWEEN UNBOUNDED
> PRECEDING AND UNBOUNDED FOLLOWING );
> 
> I see following lines in response:
> ---
> ERROR:  cannot override frame clause of window "pkw"
> LINE 1: select first_value( pk ) OVER ( pkw ) FROM t

Try without the parenthesis in OVER:

select first_value( pk ) OVER pkw FROM t
WINDOW pkw AS ( PARTITION BY pk ORDER BY pk RANGE BETWEEN UNBOUNDED
PRECEDING AND UNBOUNDED FOLLOWING );

I'm quite surprised by the error message that produces, though...

-- 
  Heikki Linnakangas
  EnterpriseDB   http://www.enterprisedb.com

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

Reply via email to