From be4cd18f71daef23d85703fb7542ae50d802e07c Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 18 Aug 2009 23:40:20 +0000 Subject: Allow mixing of traditional and SQL:2008 LIMIT/OFFSET syntax. Being rigid about it doesn't simplify the grammar at all, and it does invite confusion among those who only read the SELECT syntax summary and not the full details. Per gripe from Jaime Casanova. --- doc/src/sgml/ref/select.sgml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'doc/src/sgml') diff --git a/doc/src/sgml/ref/select.sgml b/doc/src/sgml/ref/select.sgml index 9675adcbf86..d67d2b4ff76 100644 --- a/doc/src/sgml/ref/select.sgml +++ b/doc/src/sgml/ref/select.sgml @@ -1,5 +1,5 @@ @@ -1005,14 +1005,15 @@ OFFSET start SQL:2008 introduced a different syntax to achieve the same thing, - which PostgreSQL also supports. It is: + which PostgreSQL also supports. It is: OFFSET start { ROW | ROWS } FETCH { FIRST | NEXT } [ count ] { ROW | ROWS } ONLY - Both clauses are optional, but if present - the OFFSET clause must come before - the FETCH clause. ROW + According to the standard, the OFFSET clause must come + before the FETCH clause if both are present; but + PostgreSQL is laxer and allows either order. + ROW and ROWS as well as FIRST and NEXT are noise words that don't influence the effects of these clauses. In this syntax, when using expressions -- cgit v1.2.3