Re: Implementing next 30 (or so) rows "sliding window"

From: Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec>
To: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
Cc: Allan Kamau <kamauallan(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Implementing next 30 (or so) rows "sliding window"
Date: 2009-12-09 14:01:53
Message-ID: 3073cc9b0912090601s7dabe26cte4a2bcd0eccac21a@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Dec 8, 2009 at 3:51 PM, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com> wrote:
> On Tue, Dec 8, 2009 at 12:12 PM, Allan Kamau <kamauallan(at)gmail(dot)com> wrote:
>> Hi,
>> I did follow the basic advise and consulted the documentation for
>> "SELECT" and came across "[ FETCH { FIRST | NEXT } [ count ] { ROW |
>> ROWS } ONLY]" clause which seems to satisfy my requirement.
>
> This is a cursor,

no. this is sql 2008 syntax for the LIMIT clause:
http://www.postgresql.org/docs/8.4/static/sql-select.html#SQL-LIMIT

> which is one of two very basic ways of doing this.

i agree, that using cursor is another (preferred?) solution for this,

--
Atentamente,
Jaime Casanova
Soporte y capacitación de PostgreSQL
Asesoría y desarrollo de sistemas
Guayaquil - Ecuador
Cel. +59387171157

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Radcon Entec 2009-12-09 14:50:28 pgAdmin in 8.4 installation uses tools from 8.3 installation
Previous Message AlexeyChe 2009-12-09 13:33:22 C functions, dll, server fall down