mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-15 08:20:16 +08:00
Change LIMIT #,# error message to be more generic.
This commit is contained in:
parent
f363b3177d
commit
bb8f8e6279
@ -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); }
|
||||
;
|
||||
|
Loading…
Reference in New Issue
Block a user