Re: Use of the LIMIT clause ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Spy <spy(at)joystick(dot)fr>
Cc: pgsql-admin(at)postgresql(dot)org, pgsql-sql(at)postgresql(dot)org
Subject: Re: Use of the LIMIT clause ?
Date: 2001-03-13 02:21:58
Message-ID: 17374.984450118@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-sql

Spy <spy(at)joystick(dot)fr> 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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Richard Bayet 2001-03-13 06:36:08 Use of the LIMIT clause ?
Previous Message Spy 2001-03-13 01:31:06 Re: Use of the LIMIT clause ?

Browse pgsql-sql by date

  From Date Subject
Next Message Stephan Szabo 2001-03-13 02:41:05 Re: How does this query work.....?
Previous Message Rob Arnold 2001-03-13 02:20:27 Re: [SQL] Permissons on database