*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.266 2001/10/20 02:55:39 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.267 2001/10/20 16:51:02 momjian Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
;
-select_limit: LIMIT select_offset_value ',' select_limit_value
- { elog(ERROR,"LIMIT #,# syntax no longer supported. Use LIMIT # OFFSET #."); }
- | LIMIT select_limit_value OFFSET select_offset_value
+select_limit: LIMIT select_limit_value OFFSET select_offset_value
{ $$ = makeList2($4, $2); }
- | LIMIT select_limit_value
- { $$ = makeList2(NULL, $2); }
| OFFSET select_offset_value LIMIT select_limit_value
{ $$ = makeList2($2, $4); }
+ | LIMIT select_limit_value
+ { $$ = makeList2(NULL, $2); }
| OFFSET select_offset_value
{ $$ = makeList2($2, NULL); }
+ | LIMIT select_offset_value ',' select_limit_value
+ { elog(ERROR, "LIMIT #,# syntax no longer supported.\n\tUse separate LIMIT and OFFSET clauses."); }
;
+
opt_select_limit: select_limit { $$ = $1; }
| /* EMPTY */ { $$ = makeList2(NULL,NULL); }
;