Re: reg:Query

From: Kris Deugau <kdeugau(at)vianet(dot)ca>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: reg:Query
Date: 2006-05-16 16:06:05
Message-ID: 4469F86D.7040706@vianet.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

[Please keep mail on-list; I don't need multiple copies. Thanks.]

Andy Shellam wrote:
> I think it changed in 8.0 onwards.
>
> I used an application that was written for 7.4 on my 8.0.3 server, and it
> threw up errors at the LIMIT statements, saying the "LIMIT X,Y" format was
> deprecated, and to use "LIMIT X OFFSET Y" instead - so I had to have much of
> the application queries rewritten.
>
> Ref: section 7.6 in the 8.1-series manual.
>
> I'm sure you could use both pre-8.0 - it's just that the LIMIT X,Y format
> was withdrawn after 8.0.

Er, that's what I meant: I've never seen the LIMIT X,Y format, but I've
been using the LIMIT X OFFSET Y format with both 7.2 and 7.4.
(Actually, IIRC, this is one of the few bits of code of any kind in my
particular app that's still hanging around from before I took over
maintenance... when it ran on MySQL. <G> I quickly switched over to
Postgres for quite a long list of reasons.)

Your earlier messages in the thread seemed to imply that LIMIT X,Y was
the ONLY format that would work pre-8.0. Which definitely isn't the
case - unless I've been using some mutated third-party-patched versions
of Postgres. (Entirely possible given that I usually install
distribution packages rather than build-from-source- although I'd be
very surprised if this was one of the changes.)

-kgd

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Andy Shellam 2006-05-16 16:18:28 Re: reg:Query
Previous Message Andy Shellam 2006-05-16 14:53:31 Re: reg:Query