pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedSelect... RANGE?
3+ messages / 3 participants
[nested] [flat]
* Select... RANGE?
@ 1999-01-23 19:52 Tim Perdue, The Des Moines City.net <tim@dmcity.net>
0 siblings, 0 replies; 3+ messages in thread
From: Tim Perdue, The Des Moines City.net @ 1999-01-23 19:52 UTC (permalink / raw)
To: pgsql-sql@hub.org
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
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: [SQL] Select... RANGE?
@ 1999-01-23 23:06 David Hartwig <daybee@bellatlantic.net>
0 siblings, 1 reply; 3+ messages in thread
From: David Hartwig @ 1999-01-23 23:06 UTC (permalink / raw)
To: Tim Perdue, The Des Moines City.net <tim@dmcity.net>; pgsql-sql@hub.org
See DECLARE CURSOR, MOVE and FETCH.
----- Original Message -----
From: Tim Perdue, The Des Moines City.net <tim@dmcity.net>
To: <pgsql-sql@hub.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
>
>
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: [SQL] Select... RANGE?
@ 1999-01-24 09:54 Oleg Bartunov <oleg@sai.msu.su>
parent: David Hartwig <daybee@bellatlantic.net>
0 siblings, 0 replies; 3+ messages in thread
From: Oleg Bartunov @ 1999-01-24 09:54 UTC (permalink / raw)
To: David Hartwig <daybee@bellatlantic.net>; +Cc: Tim Perdue, The Des Moines City.net <tim@dmcity.net>; pgsql-sql@hub.org
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@bellatlantic.net>
> To: "Tim Perdue, The Des Moines City.net" <tim@dmcity.net>,
> pgsql-sql@hub.org
> Subject: Re: [SQL] Select... RANGE?
>
> See DECLARE CURSOR, MOVE and FETCH.
>
>
> ----- Original Message -----
> From: Tim Perdue, The Des Moines City.net <tim@dmcity.net>
> To: <pgsql-sql@hub.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@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~1999-01-24 09:54 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-01-23 19:52 Select... RANGE? Tim Perdue, The Des Moines City.net <tim@dmcity.net>
1999-01-23 23:06 Re: [SQL] Select... RANGE? David Hartwig <daybee@bellatlantic.net>
1999-01-24 09:54 ` Oleg Bartunov <oleg@sai.msu.su>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox