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 14:32:42
Message-ID: 4469E28A.90207@vianet.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Andy Shellam 2006-05-16 14:53:31 Re: reg:Query
Previous Message Tom Lane 2006-05-16 13:41:00 Re: Upgrade from 7.3.9 to 7.4.9: autocommit problems