Re: Numbering rows - Mailing list pgsql-general

From Scott Marlowe
Subject Re: Numbering rows
Date
Msg-id dcc563d10810151232lb73c289gc83cc65978b6113b@mail.gmail.com
Whole thread Raw
In response to Re: Numbering rows  ("Richard Broersma" <richard.broersma@gmail.com>)
Responses Re: Numbering rows  ("Richard Broersma" <richard.broersma@gmail.com>)
List pgsql-general
On Wed, Oct 15, 2008 at 1:23 PM, Richard Broersma
<richard.broersma@gmail.com> wrote:
> On Wed, Oct 15, 2008 at 12:08 PM, ries van Twisk <pg@rvt.dds.nl> wrote:
>> May be this function can help :
>>
>> http://www.postgresql.org/docs/8.3/static/functions-srf.html
>
> Using generate series won't number the rows that way that you would
> want.  You basically will end up with a cross join between the
> generated series and the requested set.   There are three ways that I
> know of to get a row number:

Can't you put the query into a subselect with an offset 0 and join to
that to get the generate_series to work correctly?

pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Drupal and PostgreSQL - performance issues?
Next
From: Michele Petrazzo - Unipex srl
Date:
Subject: No select permission on a table but can query it