Re: How to implement oracle like rownum(function or seudocolumn) ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Juan Manuel Diaz Lara <jmdiazlr(at)yahoo(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: How to implement oracle like rownum(function or seudocolumn) ?
Date: 2006-04-08 16:46:06
Message-ID: 23603.1144514766@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Juan Manuel Diaz Lara <jmdiazlr(at)yahoo(dot)com> writes:
> I need a rownum column, like Oracle. I have searched the mailing lists and I don't see a satisfactory solution, so I was wondering write a UDF to implement it, the requirements are:

Try keeping a counter in fcinfo->flinfo->fn_extra.

> 3. And more important, need to be called in the right place when called from subquerys:

Don't expect miracles in this department. The planner will evaluate the
function where it sees fit...

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jonah H. Harris 2006-04-08 17:16:08 Re: Support Parallel Query Execution in Executor
Previous Message Juan Manuel Diaz Lara 2006-04-08 16:33:27 How to implement oracle like rownum(function or seudocolumn) ?