Change LIMIT #,# error message to be more generic.

This commit is contained in:
Bruce Momjian 2001-10-20 16:51:02 +00:00
parent f363b3177d
commit bb8f8e6279

View File

@ -11,7 +11,7 @@
*
*
* 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
@ -3647,18 +3647,19 @@ OptUseOp: USING all_Op { $$ = $2; }
;
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); }
;