Re: increment row number function question - Mailing list pgsql-general

From Matthew Peter
Subject Re: increment row number function question
Date
Msg-id 20061007234700.99125.qmail@web35203.mail.mud.yahoo.com
Whole thread Raw
In response to Re: increment row number function question  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: increment row number function question  (Ron Johnson <ron.l.johnson@cox.net>)
List pgsql-general
Thanks for the reply.
Even if such a function existed, it would almost certainly not do what
you want in this query. Per SQL spec, the SELECT target list is
logically supposed to be evaluated before the ORDER BY and LIMIT steps, which means you'd get numbers associated with the physical ordering of the rows not their some_col ordering.
Shucks. I wanted to return a set with an ordered iterator determined by the ORDER BY. Could that be done?
regards, tom lane

Thanks again.
 


Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less.

pgsql-general by date:

Previous
From: "Mario Soto"
Date:
Subject: please how to unsuscribe to list
Next
From: "ck"
Date:
Subject: How to force the parser to use index scan instead of sequential scan