Re: [SQL] Select... RANGE?

From: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
To: David Hartwig <daybee(at)bellatlantic(dot)net>
Cc: "Tim Perdue, The Des Moines City(dot)net" <tim(at)dmcity(dot)net>, pgsql-sql(at)hub(dot)org
Subject: Re: [SQL] Select... RANGE?
Date: 1999-01-24 09:54:49
Message-ID: Pine.GSO.3.96.SK.990124125056.7926C-100000@ra
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hello,

I think the original poster was thinking about feature-patch avalaiable
at patches directory which was well done by Jan.
It's not approved by Jan how it works with 6.4.2 but
I use it with 6.4.2 (actually patch which was posted in hackers mailing list)
and it works fine for my purposes.

from README:

Feature coming with this patch:

LIMIT This is a new option to the SELECT statement, telling
the database that only some of the rows selected
should be returned in the result set.

The added syntax of the LIMIT option is:

SELECT ... [LIMIT {ALL | lim} [, off]];
or
SELECT ... [LIMIT {ALL | lim}] [OFFSET off];

where lim is a positive integer value greater than
zero and off is an integer value greater or equal to
zero. Both values can be specified as Parameters when
using the server programming interface (SPI). In this
case, a zero value given in the argument for the lim
parameter means ALL.

Regards,

Oleg

On Sat, 23 Jan 1999, David Hartwig wrote:

> Date: Sat, 23 Jan 1999 18:06:09 -0500
> From: David Hartwig <daybee(at)bellatlantic(dot)net>
> To: "Tim Perdue, The Des Moines City.net" <tim(at)dmcity(dot)net>,
> pgsql-sql(at)hub(dot)org
> Subject: Re: [SQL] Select... RANGE?
>
> See DECLARE CURSOR, MOVE and FETCH.
>
>
> ----- Original Message -----
> From: Tim Perdue, The Des Moines City.net <tim(at)dmcity(dot)net>
> To: <pgsql-sql(at)hub(dot)org>
> Sent: Saturday, January 23, 1999 2:52 PM
> Subject: [SQL] Select... RANGE?
>
>
> >I'm not finding any sample code that allows you to select a range in a
> >result set.
> >
> >Let's say my query matches 500 records. I want it to return records
> 100-125.
> >I'm pretty sure I've seen this done, but I don't know where/how.
> >
> >Tim
> >
> >
>
>

_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Herouth Maoz 1999-01-24 10:52:54 Re: [SQL] Java/JDBC/PGSQL Mailing List Archiver
Previous Message David Hartwig 1999-01-23 23:06:09 Re: [SQL] Select... RANGE?