Remove ROW | ROWS from OFFSET and FETCH

Поиск
Список
Период
Сортировка
От Thom Brown
Тема Remove ROW | ROWS from OFFSET and FETCH
Дата
Msg-id bddc86151003251701t37ec6f67ida1788e67b5d0543@mail.gmail.com
обсуждение исходный текст
Ответы Re: Remove ROW | ROWS from OFFSET and FETCH
Список pgsql-hackers
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


В списке pgsql-hackers по дате отправления: