Commit bb8f8e62 authored by Bruce Momjian's avatar Bruce Momjian

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

parent f363b317
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
* *
* *
* IDENTIFICATION * 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 * HISTORY
* AUTHOR DATE MAJOR EVENT * AUTHOR DATE MAJOR EVENT
...@@ -3647,18 +3647,19 @@ OptUseOp: USING all_Op { $$ = $2; } ...@@ -3647,18 +3647,19 @@ OptUseOp: USING all_Op { $$ = $2; }
; ;
select_limit: LIMIT select_offset_value ',' select_limit_value select_limit: LIMIT select_limit_value OFFSET select_offset_value
{ elog(ERROR,"LIMIT #,# syntax no longer supported. Use LIMIT # OFFSET #."); }
| LIMIT select_limit_value OFFSET select_offset_value
{ $$ = makeList2($4, $2); } { $$ = makeList2($4, $2); }
| LIMIT select_limit_value
{ $$ = makeList2(NULL, $2); }
| OFFSET select_offset_value LIMIT select_limit_value | OFFSET select_offset_value LIMIT select_limit_value
{ $$ = makeList2($2, $4); } { $$ = makeList2($2, $4); }
| LIMIT select_limit_value
{ $$ = makeList2(NULL, $2); }
| OFFSET select_offset_value | OFFSET select_offset_value
{ $$ = makeList2($2, NULL); } { $$ = 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; } opt_select_limit: select_limit { $$ = $1; }
| /* EMPTY */ { $$ = makeList2(NULL,NULL); } | /* EMPTY */ { $$ = makeList2(NULL,NULL); }
; ;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment