public inbox for [email protected]  
help / color / mirror / Atom feed
From: Jaime Casanova <[email protected]>
To: pgsql-docs <[email protected]>
Subject: incorrect syntax for offset
Date: Tue, 18 Aug 2009 17:08:01 -0500
Message-ID: <[email protected]> (raw)

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=# 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=# 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;
                                    ^
-- 
Atentamente,
Jaime Casanova
Soporte y capacitación de PostgreSQL
Asesoría y desarrollo de sistemas
Guayaquil - Ecuador
Cel. +59387171157



view thread (3+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected]
  Subject: Re: incorrect syntax for offset
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox