aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pl/plpgsql/src/pl_gram.y32
1 files changed, 11 insertions, 21 deletions
diff --git a/src/pl/plpgsql/src/pl_gram.y b/src/pl/plpgsql/src/pl_gram.y
index 893f3a486f5..82378c7d5fa 100644
--- a/src/pl/plpgsql/src/pl_gram.y
+++ b/src/pl/plpgsql/src/pl_gram.y
@@ -188,7 +188,7 @@ static void check_raise_parameters(PLpgSQL_stmt_raise *stmt);
%type <str> any_identifier opt_block_label opt_label option_value
-%type <list> proc_sect proc_stmts stmt_elsifs stmt_else
+%type <list> proc_sect stmt_elsifs stmt_else
%type <loop_body> loop_body
%type <stmt> proc_stmt pl_block
%type <stmt> stmt_assign stmt_if stmt_loop stmt_while stmt_exit
@@ -318,8 +318,8 @@ static void check_raise_parameters(PLpgSQL_stmt_raise *stmt);
%token <keyword> K_RETURN
%token <keyword> K_RETURNED_SQLSTATE
%token <keyword> K_REVERSE
-%token <keyword> K_ROWTYPE
%token <keyword> K_ROW_COUNT
+%token <keyword> K_ROWTYPE
%token <keyword> K_SCHEMA
%token <keyword> K_SCHEMA_NAME
%token <keyword> K_SCROLL
@@ -838,24 +838,14 @@ assign_operator : '='
proc_sect :
{ $$ = NIL; }
- | proc_stmts
- { $$ = $1; }
- ;
-
-proc_stmts : proc_stmts proc_stmt
- {
- if ($2 == NULL)
- $$ = $1;
- else
- $$ = lappend($1, $2);
- }
- | proc_stmt
- {
- if ($1 == NULL)
- $$ = NIL;
- else
- $$ = list_make1($1);
- }
+ | proc_sect proc_stmt
+ {
+ /* don't bother linking null statements into list */
+ if ($2 == NULL)
+ $$ = $1;
+ else
+ $$ = lappend($1, $2);
+ }
;
proc_stmt : pl_block ';'
@@ -2356,8 +2346,8 @@ unreserved_keyword :
| K_PG_EXCEPTION_CONTEXT
| K_PG_EXCEPTION_DETAIL
| K_PG_EXCEPTION_HINT
- | K_PRIOR
| K_PRINT_STRICT_PARAMS
+ | K_PRIOR
| K_QUERY
| K_RELATIVE
| K_RESULT_OID