I figured it out, maybe is not the most elegant way but it work for my
case where only small sets are retrieved
create table foo2 (pk int, valor numeric(12,2), porce numeric(5,2));
insert into foo2 values (1,7893.45,0.4);
insert into foo2 values (5,7893.45,0.3);
insert into foo2 values (9,7893.45,0.3);
select *,
(select count(*) from foo2 as f2
where f2.oid <= foo2.oid) as counter
from foo2;
--
Sinceramente,
Josué Maldonado.
... "Un científico es un hombre tan endeble y humano como cualquiera;
sin embargo, la búsqueda científica puede ennoblecerle, incluso en
contra de su voluntad." -- Isaac Asimov