Re: Web + Slicing/Paging datas

From: Jasen Betts <jasen(at)xnet(dot)co(dot)nz>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Web + Slicing/Paging datas
Date: 2009-04-28 12:21:19
Message-ID: gt6sbv$kao$2@reversiblemaps.ath.cx
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 2009-04-23, durumdara <durumdara(at)gmail(dot)com> wrote:
> Hi!
>
> In a mod_py application I wanna write a wrapper that handle all PSQL
> data view with paging/slicing.
>
> For example:
> I have 1.500 records. I wanna show only N (f. ex: 15) records in the
> view, other records are accessable with a pager (links):

For small numbers of records you can use

SELECT ...
... LIMIT how_many OFFSET where_to_start

If there are a large number of results this may be inefficient.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tim Uckun 2009-04-28 12:29:36 Re: Huge sample dataset for testing.
Previous Message Jasen Betts 2009-04-28 11:58:20 Re: Sequence Incrementing by 2 insted of 1