Re: [GENERAL] Simulate count result are distinct between 8.3 and 8.4

2009-08-13 Thread Emanuel Calvo Franco
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

[GENERAL] Simulate count result are distinct between 8.3 and 8.4

2009-08-12 Thread Emanuel Calvo Franco
hi people! I have this test query to simulate rownums in 8.3: SELECT (select count(i)+1 from prueba where i xi.i ) as rownum, i, p FROM prueba xi limit 5; Devuelve , que esta bien: 1;1;299361 2;2;421127 3;3;166284 4;4;458945 5;5;81619 But in 8.4 throws this: postgres=# SELECT postgres-#

Re: [GENERAL] Simulate count result are distinct between 8.3 and 8.4

2009-08-12 Thread Chris
Emanuel Calvo Franco wrote: hi people! I have this test query to simulate rownums in 8.3: SELECT (select count(i)+1 from prueba where i xi.i ) as rownum, i, p FROM prueba xi limit 5; Devuelve , que esta bien: 1;1;299361 2;2;421127 3;3;166284 4;4;458945 5;5;81619 But in 8.4 throws this:

Re: [GENERAL] Simulate count result are distinct between 8.3 and 8.4

2009-08-12 Thread Shoaib Mir
On Thu, Aug 13, 2009 at 9:37 AM, Chris dmag...@gmail.com wrote: Emanuel Calvo Franco wrote: But in 8.4 throws this: postgres=# SELECT postgres-# (select count(i)+1 from prueba postgres(# where i xi.i postgres(# ) as rownum, i, p postgres-# FROM prueba xi limit 5; rownum | i|