Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id C8B83633AD8 for ; Tue, 18 Aug 2009 19:08:30 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 88081-08 for ; Tue, 18 Aug 2009 22:08:14 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-bw0-f208.google.com (mail-bw0-f208.google.com [209.85.218.208]) by mail.postgresql.org (Postfix) with ESMTP id 721976348ED for ; Tue, 18 Aug 2009 19:08:19 -0300 (ADT) Received: by bwz4 with SMTP id 4so3441750bwz.24 for ; Tue, 18 Aug 2009 15:08:16 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.50.21 with SMTP id c21mr2135374muk.27.1250633296815; Tue, 18 Aug 2009 15:08:16 -0700 (PDT) From: Jaime Casanova Date: Tue, 18 Aug 2009 17:08:01 -0500 Message-ID: <3073cc9b0908181508n766464b7jffab0fa3977299e5@mail.gmail.com> Subject: incorrect syntax for offset To: pgsql-docs Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.669 tagged_above=-10 required=5 tests=AWL=-0.929, BAYES_20=-0.74 X-Spam-Level: X-Archive-Number: 200908/32 X-Sequence-Number: 5250 Hi. Our current docs says that we support the following syntax (i'm putting just the lines that disturbes me) inside a SELECT statement """ [ LIMIT { count | ALL } ] [ OFFSET start [ ROW | ROWS ] ] [ FETCH { FIRST | NEXT } [ count ] { ROW | ROWS } ONLY ] """ i read that as allow me to use the ROWS in an OFFSET clause whatever i use LIMIT or FETCH for limiting results but seems like we try hard to make a distinguish from old syntax and new (sql standard) syntax pruebas=3D# select * from tab1 limit 3 offset 2 rows; ERROR: syntax error at or near "rows" LINE 1: select * from tab1 limit 3 offset 2 rows; ^ pruebas=3D# select * from tab1 offset 2 fetch next 3 rows only; ERROR: syntax error at or near "fetch" LINE 1: select * from tab1 offset 2 fetch next 3 rows only; ^ --=20 Atentamente, Jaime Casanova Soporte y capacitaci=C3=B3n de PostgreSQL Asesor=C3=ADa y desarrollo de sistemas Guayaquil - Ecuador Cel. +59387171157