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