Re: To Postgres Devs : Wouldn't changing the select limit

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Philip Hallstrom <philip(at)adhesivemedia(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jochem van Dieten <jochemd(at)oli(dot)tudelft(dot)nl>, pgsql-general(at)postgresql(dot)org
Subject: Re: To Postgres Devs : Wouldn't changing the select limit
Date: 2001-10-18 21:31:46
Message-ID: 200110182131.f9ILVk328817@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers


OK, I see several votes that say remove LIMIT #,# now, in 7.2 and throw
an error telling them to use LIMIT # OFFSET #.

The only other option is to throw a NOTICE that LIMIT #,# will go away
in 7.3.

Unless I hear otherwise, I will assume people prefer the first option.

---------------------------------------------------------------------------
> As a user of both MySQL and PostgreSQL I can say that I would *love* it if
> you went with "LIMIT n OFFSET m" instead of "LIMIT m,n". *every* time I
> use the offset feature I have to look it up in the manual or some other
> code snippet that has it (and where it's clear).
>
> Even it broke some script I'd written it's pretty easy to find and fix
> it...
>
> just my 2 cents...
>
> On Thu, 18 Oct 2001, Tom Lane wrote:
>
> > Jochem van Dieten <jochemd(at)oli(dot)tudelft(dot)nl> writes:
> > > I would say the relevant behaviour is neither the one that MySQL
> > > historically uses nor the one that PostgreSQL historically uses, but the
> > > one that is specified in the relevant standards.
> >
> > There aren't any: SQL92 and SQL99 have no such feature. (Although I
> > notice that they list LIMIT as a word likely to become reserved in
> > future versions.)
> >
> > AFAIK we copied the idea and the syntax from MySQL ... but we got the
> > order of the parameters wrong.
> >
> > IMHO "LIMIT n OFFSET n" is far more readable than "LIMIT m,n" anyway.
> > (Quick: which number is first in the comma version? By what reasoning
> > could you deduce that if you'd forgotten?) So I think we should
> > deprecate and eventually eliminate the comma version, if we're not
> > going to conform to the de facto standard for it.
> >
> > regards, tom lane
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 2: you can get off all lists at once with the unregister command
> > (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
> >
>
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Rich Shepard 2001-10-18 22:00:07 Possible bug in postgresql-7.1.3-1PGDG
Previous Message Andrew Gould 2001-10-18 21:12:09 Re: Backup Postgre Windows to Linux

Browse pgsql-hackers by date

  From Date Subject
Next Message Gavin Sherry 2001-10-18 22:00:29 Re: Create or replace function doesn't work so well
Previous Message Dan 2001-10-18 21:24:54 Re: autoconf taking forever?