Re: Does Postgresql have a similar pseudo-column "ROWNUM" as - Mailing list pgsql-sql

From Ragnar Hafstað
Subject Re: Does Postgresql have a similar pseudo-column "ROWNUM" as
Date
Msg-id 1116368874.9362.14.camel@localhost.localdomain
Whole thread Raw
In response to Re: Does Postgresql have a similar pseudo-column "ROWNUM" as  (PFC <lists@boutiquenumerique.com>)
List pgsql-sql
On Wed, 2005-05-18 at 00:13 +0200, PFC wrote:
> > your subsequent selects are
> > select ... from tab WHERE skey>skey_last
> >                        OR (skey=skey_last AND pkey>pkey_last)
> >                     ORDER BY skey,pkey
> >                     LIMIT 100 OFFSET 100;
> 
>     why offset ?
>     you should be able to use the skey, pkey values of the last row on the  
> page to show the next page, no need for offset then.

of course you are right. the WHERE clause is supposed to replace
the OFFSET. too much cut and pasting without thinking and testing.

gnari




pgsql-sql by date:

Previous
From: PFC
Date:
Subject: Re: Does Postgresql have a similar pseudo-column "ROWNUM" as
Next
From: Alain
Date:
Subject: Re: Does Postgresql have a similar pseudo-column "ROWNUM" as