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 f2D2M7x23937; Mon, 12 Mar 2001 21:22:07 -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 f2D2Lwt17377; Mon, 12 Mar 2001 21:21:58 -0500 (EST) To: Spy cc: pgsql-admin@postgresql.org, pgsql-sql@postgresql.org Subject: Re: Use of the LIMIT clause ? In-reply-to: <3AAD785A.2DAEDCE@joystick.fr> References: <3AADBFD7.D462E190@enseirb.fr> <7612.984439579@sss.pgh.pa.us> <3AAD785A.2DAEDCE@joystick.fr> Comments: In-reply-to Spy message dated "Tue, 13 Mar 2001 02:31:06 +0100" Date: Mon, 12 Mar 2001 21:21:58 -0500 Message-ID: <17374.984450118@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200103/100 X-Sequence-Number: 948 Spy writes: > Tom Lane a écrit : >> 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. > But MySQL's syntax is different, as found on > http://www.mysql.com/doc/S/E/SELECT.html : > "SELECT [STRAIGHT_JOIN] [SQL_SMALL_RESULT] [SQL_BIG_RESULT] > [SQL_BUFFER_RESULT] > [...] > [LIMIT [offset,] rows]" That's annoying; looks like we do it backwards from MySQL. Can anyone confirm that this is how MySQL behaves (maybe it's a typo on this documentation page)? Should we consider changing ours if it is different? Are there any other RDBMSes that implement two-parameter LIMIT? regards, tom lane