Re: reg:Query - Mailing list pgsql-admin

From Kris Deugau
Subject Re: reg:Query
Date
Msg-id 4469E28A.90207@vianet.ca
Whole thread Raw
In response to Re: reg:Query  ("Andy Shellam" <andy.shellam@mailnetwork.co.uk>)
Responses Re: reg:Query  ("Andy Shellam" <andy.shellam@mailnetwork.co.uk>)
List pgsql-admin
Andy Shellam wrote:
> Depends on which version of Postgres you’re using (pre-8.0 or post-8.0)
>
> I think the format changed from v8.0 onwards.  So, for example, post-8.0:
>
>        SELECT email_address FROM account_details ORDER BY address_id LIMIT 1
> OFFSET 0;
>
> Will bring back the first row.  The following will bring back the next and
> so on:
>
>     SELECT email_address FROM account_details ORDER BY address_id LIMIT
> 1 OFFSET 1;
>
> Pre-8.0 the queries would be:
>
>        SELECT email_address FROM account_details ORDER BY address_id LIMIT
> 1, 0;
>        SELECT email_address FROM account_details ORDER BY address_id LIMIT
> 1, 1;

Curious;  I've never seen this format.  I've been using the first for
some time now with 7.2.something (Debian Woody), and more recently
7.4.something (Debian Sarge).  No problems.  Most access is via Perl
DBI, but the exact same SQL works just fine from a psql shell.

-kgd

pgsql-admin by date:

Previous
From: Tom Lane
Date:
Subject: Re: Upgrade from 7.3.9 to 7.4.9: autocommit problems
Next
From: "Andy Shellam"
Date:
Subject: Re: reg:Query