Allow IS and FOR in Pl/PgSQL cursors, per Oracle and ANSI. Jan-approved.

This commit is contained in:
Bruce Momjian 2001-05-31 17:15:40 +00:00
parent 0cee65b51f
commit c9a001a11e

View File

@ -4,7 +4,7 @@
* procedural language * procedural language
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/pl/plpgsql/src/gram.y,v 1.19 2001/05/21 14:22:18 wieck Exp $ * $Header: /cvsroot/pgsql/src/pl/plpgsql/src/gram.y,v 1.20 2001/05/31 17:15:40 momjian Exp $
* *
* This software is copyrighted by Jan Wieck - Hamburg. * This software is copyrighted by Jan Wieck - Hamburg.
* *
@ -355,7 +355,7 @@ decl_statement : decl_varname decl_const decl_datatype decl_notnull decl_defval
{ {
plpgsql_ns_rename($2, $4); plpgsql_ns_rename($2, $4);
} }
| decl_varname K_CURSOR decl_cursor_args K_IS K_SELECT decl_cursor_query | decl_varname K_CURSOR decl_cursor_args decl_is_from K_SELECT decl_cursor_query
{ {
PLpgSQL_var *new; PLpgSQL_var *new;
PLpgSQL_expr *curname_def; PLpgSQL_expr *curname_def;
@ -500,6 +500,8 @@ decl_cursor_openparen : '('
} }
; ;
decl_is_from : K_IS | /* Oracle */
K_FOR; /* ANSI */
decl_aliasitem : T_WORD decl_aliasitem : T_WORD
{ {