Re: Enumerating a row set

From: George Sakkis <george(dot)sakkis(at)gmail(dot)com>
To: David Fetter <david(at)fetter(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Enumerating a row set
Date: 2009-03-27 12:21:55
Message-ID: 91ad5bf80903270521veed94e3l9abf79aee9fa21a0@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Mar 26, 2009 at 8:55 PM, David Fetter <david(at)fetter(dot)org> wrote:

> In PostgreSQL 8.4, you'll be able to do:
>
> SELECT
>    row_number() OVER (ORDER BY col1) AS i,
>    e.col1,
>    e.col2,
>    ...
> FROM ...

Good news! Better late than never :)

> Until then, there are some ugly, fragile workarounds with
> generate_series() and/or temp sequences.

That's exactly my impression based on the other replies and searching
for "postgresql rownum" online.

Thanks,
George

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Sam Mason 2009-03-27 14:16:46 Re: log shipping from 64 bit linux server to a 32 bit linux server
Previous Message Marc Mamin 2009-03-27 10:02:01 Re: Enumerating a row set