Received: from sss.pgh.pa.us (sss.pgh.pa.us [209.114.132.154]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f2CNQOx96680 for ; Mon, 12 Mar 2001 18:26:24 -0500 (EST) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.1/8.11.1) with ESMTP id f2CNQJt07615; Mon, 12 Mar 2001 18:26:19 -0500 (EST) To: Richard Bayet cc: pgsql-admin@postgresql.org Subject: Re: Use of the LIMIT clause ? In-reply-to: <3AADBFD7.D462E190@enseirb.fr> References: <3AADBFD7.D462E190@enseirb.fr> Comments: In-reply-to Richard Bayet message dated "Mon, 12 Mar 2001 23:36:08 -0700" Date: Mon, 12 Mar 2001 18:26:19 -0500 Message-ID: <7612.984439579@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200103/93 X-Sequence-Number: 941 Richard Bayet 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