Re: [SQL] ROW_NUMBER alias

2007-05-06 Thread Robins
Hi Stefan, Well that was just an example. That table had a primary key on (id, date). By bad then, coz I guess I should have clarified that earlier. But what I meant from the example was that it is trivial for the parser to automatically put an enveloping SELECT to add a ROW_NUMBER() field to an

Re: [SQL] hi

2007-05-06 Thread John Summerfield
Penchalaiah P. wrote: Information transmitted by this e-mail is proprietary to Infinite Computer Solutions It may be proprietary, but it shore ain't confidential! ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore y

Re: [SQL] ROW_NUMBER alias

2007-05-06 Thread Stefan Becker
I might be told off by some better SQL-User here on the list - still here is my 2 Cents worth > I needed ROW_NUMBER() in PostGresql and I did find the 'temporary sequence' > method as a workaround and i think it at least gets the job done relatively you use: > CREATE TEMP SEQUENCE rownum

Re: [SQL] Sequence vs. Index Scan

2007-05-06 Thread Aaron Bono
On 5/5/07, Jaime Casanova <[EMAIL PROTECTED]> wrote: On 5/5/07, Aaron Bono <[EMAIL PROTECTED]> wrote: > On 5/5/07, Tom Lane <[EMAIL PROTECTED]> wrote: > > "Aaron Bono" <[EMAIL PROTECTED]> writes: > > > 9. -> Seq Scan on branch (cost= 0.00..4.72 > rows=1 > > > width=12

[SQL] ROW_NUMBER alias

2007-05-06 Thread Robins
Hi, I needed ROW_NUMBER() in PostGresql and I did find the 'temporary sequence' method as a workaround and i think it at least gets the job done relatively well, ... so no problems there. Its just that from a usability point of view, isn't it better that we provide some kind of an aliasing mecha