From: Thom Brown on
Hi,

I was wondering if it might be worth making ROW/ROWS optional for
OFFSET and FETCH clauses? And can ONLY be optional too?

So:

OFFSET start { ROW | ROWS }
FETCH { FIRST | NEXT } [ count ] { ROW | ROWS } ONLY

Would become

OFFSET start [ ROW | ROWS ]
FETCH { FIRST | NEXT } [ count ] [ ROW | ROWS ] [ONLY]

So instead of:

SELECT *
FROM my_table
OFFSET 4 ROWS
FETCH FIRST 10 ROWS ONLY;

one could write:

SELECT *
FROM my_table
OFFSET 4
FETCH FIRST 10;

The only case where ROW would be mandatory would be for FETCH FIRST ROW ONLY.

....although I suspect I'm missing something obvious or reasonable here ;)

Thom

--
Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers