Search Postgresql Archives

Re: Enumerating a row set

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 26, 2009 at 8:55 PM, David Fetter <david@xxxxxxxxxx> 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

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux