Cedric, > See this example: > # create table foo (i int, t timestamptz); > # insert into foo select n, now() from generate_series(1,10) g(n); > # select i, first_value(i) over (order by t desc) from foo; > # select i, first_value(i) over (order by t desc ROWS between 0 PRECEDING and > UNBOUNDED FOLLOWING) from foo; > > What do you expect "SELECT first(val order by ts desc)" to output ? >
Ah, right, I see what you mean. Yeah, I was doing queries without peer rows, so it looked the same to me, and it uses some of the same machinery. But of course it's not completely the same. -- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers