pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Martin Christensen <factotum@mail1.stofanet.dk>
To: Jeff Hoffmann <jeff@propertykey.com>
Cc: Nikolay Mijaylov <nmmm@nmmm.nu>
Cc: pgsql-sql@postgresql.org
Subject: Re: fetching rows
Date: 30 Oct 2000 23:07:19 +0100
Message-ID: <87d7gikmp4.fsf@fangorn.stofanet.dk> (raw)
References: <NDBBJGGFCLFEEGHHKCABCEGCDIAA.nmmm@nmmm.nu>
	<39FDC5BC.43C5AE76@propertykey.com>

>>>>> "Jeff" == Jeff Hoffmann <jeff@propertykey.com> writes:
Jeff> you can't do that with a cursor, but you can use they mysql-ism
Jeff> called a limit clause.  for example, to fetch rows 26-50 from
Jeff> that query, you'd do:
Jeff> select * from films limit 25,26;
Jeff> or
Jeff> select * from files limit 25 offset 26;

Since there's no particular ordering of the output of such a query it
is necessary to explicitly state an ordering key. Otherwise you'll
quickly find that the phase of the moon has very significant influence
on the produced results. :-) Especially in 7.*, as I understand it.

Martin

-- 
GPG public key: http://home1.stofanet.dk/factotum/gpgkey.txt



view thread (6+ messages)  latest in thread

Message-ID: <87d7gikmp4.fsf@fangorn.stofanet.dk>
Permalink:  ../87d7gikmp4.fsf@fangorn.stofanet.dk/
Also on:    postgresql.org/message-id/87d7gikmp4.fsf@fangorn.stofanet.dk

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: factotum@mail1.stofanet.dk, jeff@propertykey.com, nmmm@nmmm.nu
  Subject: Re: fetching rows
  In-Reply-To: <87d7gikmp4.fsf@fangorn.stofanet.dk>
  References: <NDBBJGGFCLFEEGHHKCABCEGCDIAA.nmmm@nmmm.nu> <39FDC5BC.43C5AE76@propertykey.com> <87d7gikmp4.fsf@fangorn.stofanet.dk>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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