From: Tom Lane <tgl@sss.pgh.pa.us>
To: Richard Bayet <bayet@enseirb.fr>
Cc: pgsql-admin@postgresql.org
Subject: Re: Use of the LIMIT clause ?
Date: Mon, 12 Mar 2001 18:26:19 -0500
Message-ID: <7612.984439579@sss.pgh.pa.us> (raw)
In-Reply-To: <3AADBFD7.D462E190@enseirb.fr>
References: <3AADBFD7.D462E190@enseirb.fr>
Richard Bayet <bayet@enseirb.fr> writes:
> I did knew about this, but the author goes further about the "limit
> N,P", which allows someone to get only results between the Nth and Pth
> lines of the whole result...
Is that actually how MySQL interprets two parameters? We treat them
as count and offset respectively, which definition I thought was the
same as MySQL's.
> I tried this with psql, but couldn't get anything but parse errors.
Works for me:
regression=# select unique1 from tenk1 limit 10;
unique1
---------
8800
1891
3420
9850
7164
8009
5057
6701
4321
3043
(10 rows)
regression=# select unique1 from tenk1 limit 3,5;
unique1
---------
8009
5057
6701
(3 rows)
regression=#
What PG version are you running?
regards, tom lane
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: tgl@sss.pgh.pa.us, bayet@enseirb.fr, pgsql-admin@postgresql.org
Subject: Re: Use of the LIMIT clause ?
In-Reply-To: <7612.984439579@sss.pgh.pa.us>
References: <3AADBFD7.D462E190@enseirb.fr> <7612.984439579@sss.pgh.pa.us>
* 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