Thread: Break both? (Was To Postgres Devs : Wouldn't changing the select limit )

Break both? (Was To Postgres Devs : Wouldn't changing the select limit )

From
huongch@bigfoot.com (Flancer)
Date:
Ok so if both were broken then??? ERm what are we going to use??
Frankly, I thought Postgres (prior to 7.2) select limit actually made
more sense to use than mysql..

Hmm I can see some DB abstraction programmers banging their heads now
on this issue...

I happen to be using something called ADODB (php.weblogs.com) which
uses the select limit in its pageexecute method (cool convenient way
of making next and previous links..).

Re: Break both? (Was To Postgres Devs : Wouldn't changing

From
Bruce Momjian
Date:
> Ok so if both were broken then??? ERm what are we going to use??
> Frankly, I thought Postgres (prior to 7.2) select limit actually made
> more sense to use than mysql..
>
> Hmm I can see some DB abstraction programmers banging their heads now
> on this issue...
>
> I happen to be using something called ADODB (php.weblogs.com) which
> uses the select limit in its pageexecute method (cool convenient way
> of making next and previous links..).

We are not removing LIMIT at all. We are discussing changing or removing
LIMIT #,# and requiring people to use LIMIT # OFFSET #.

Obviously, in LIMIT #,#, it is not at all clear which one is the LIMIT
and which one is the OFFSET because it has been backwards from MySQL and
few people even realized it.  I can see no compelling reason to support
LIMIT #,# when the clearer LIMIT # OFFSET # can be used instead.

The only reason to have LIMIT #,# is for MySQL compatibility, and we
obviously don't have that becuase we are backwards.

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

Re: Break both? (Was To Postgres Devs : Wouldn't changing

From
huongch@bigfoot.com (Flancer)
Date:
Ooops.. didn't notice the LIMIT # OFFSET # part. IMHO the idea sounds
good and is definitely more readable.. and fair to both Mysql and
postgresql loyalists ;).

Postgres is backwards? Or did you mean you got the syntax backwards ?
;).