> > Why don't you make it simple and just use row_number() from 8.4... It can be > simplified as: > > select row_number() over(), i, p from prueba limit 5; > I know the use of WF. What surprised me, is the difference between both versions in the same query. I'm trying to understand why happens and not look for another way :) -- Emanuel Calvo Franco Database consultant at: www.siu.edu.ar www.emanuelcalvofranco.com.ar -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general