X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 357249F9F8F for ; Tue, 16 May 2006 11:40:34 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 78712-09 for ; Tue, 16 May 2006 11:40:10 -0300 (ADT) X-Greylist: delayed 00:06:29.642108 by SQLgrey- Received: from smtp.vianet.ca (smtp.vianet.ca [209.91.128.40]) by postgresql.org (Postfix) with SMTP id C71899F9C18 for ; Tue, 16 May 2006 11:40:04 -0300 (ADT) Received: (qmail 4187 invoked from network); 16 May 2006 14:33:23 -0000 Received: from unknown (HELO ?192.168.99.15?) (209.91.179.117) by smtp.vianet.ca with SMTP; 16 May 2006 14:33:23 -0000 Message-ID: <4469E28A.90207@vianet.ca> Date: Tue, 16 May 2006 10:32:42 -0400 From: Kris Deugau Reply-To: pgsql-admin@postgresql.org Organization: ViaNet User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: Re: reg:Query References: In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/216 X-Sequence-Number: 21748 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