2006/4/8, Tom Lane <[EMAIL PROTECTED]>:
> I've never understood what the conceptual model is for Oracle's rownum.
> Where along the SQL operational pipeline (FROM / WHERE / GROUP BY /
> aggregate / compute output columns / ORDER BY) is it supposed to be
> computed? To be useful for the often-requ
On Sat, Apr 08, 2006 at 03:04:40PM -0400, Tom Lane wrote:
> Jan Wieck <[EMAIL PROTECTED]> writes:
> > My humble guess is that c) is also the reason why the ANSI didn't find a
> > ROWNUM desirable.
>
> I've never understood what the conceptual model is for Oracle's rownum.
> Where along the SQL op
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:
+1
I would _love_ to see rownums in PostgreSQL :)
Chris
---(end of broadcast)-
On 4/8/06, David Fetter <[EMAIL PROTECTED]> wrote:
> Sadly, ANSI did just that.
Thanks for pointing that out... I'd been using LIMIT/OFFSET for so
long, I totally forgot about the standard :(
--
Jonah H. Harris, Database Internals Architect
EnterpriseDB Corporation
732.331.1324
On Sat, Apr 08, 2006 at 02:02:53PM -0400, Jan Wieck wrote:
> Someone correct me if I'm wrong, but I was allways under the impression
> that Oracle's ROWNUM is a thing attached to a row in the final result
> set, whatever (possibly random) order that happens to have. Now a) this
> is something th
On 4/8/06, Tom Lane <[EMAIL PROTECTED]> wrote:
> A function implemented as per Michael's example would not give the
> results that I think people would expect for
>
> SELECT rownum(), * FROM foo ORDER BY whatever;
>
Yep, the query would have to be rewritten similar to Oracle's:
SELECT row
Jan Wieck <[EMAIL PROTECTED]> writes:
> My humble guess is that c) is also the reason why the ANSI didn't find a
> ROWNUM desirable.
I've never understood what the conceptual model is for Oracle's rownum.
Where along the SQL operational pipeline (FROM / WHERE / GROUP BY /
aggregate / compute outp
On 4/8/06, Jan Wieck <[EMAIL PROTECTED]> wrote:
> Someone correct me if I'm wrong, but I was allways under the impression
> that Oracle's ROWNUM is a thing attached to a row in the final result
> set, whatever (possibly random) order that happens to have. Now a) this
> is something that IMHO belong
Someone correct me if I'm wrong, but I was allways under the impression
that Oracle's ROWNUM is a thing attached to a row in the final result
set, whatever (possibly random) order that happens to have. Now a) this
is something that IMHO belongs into the client or stored procedure code,
b) if I
On Sat, Apr 08, 2006 at 12:46:06PM -0400, Tom Lane wrote:
> Juan Manuel Diaz Lara <[EMAIL PROTECTED]> 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
Juan Manuel Diaz Lara <[EMAIL PROTECTED]> 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.
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: 1. Need to preserve state between calls to the function (the rowcount). Maybe using a MemoryContext with a lifesp
12 matches
Mail list logo