@ -199,7 +199,7 @@ static void check_raise_parameters(PLpgSQL_stmt_raise *stmt);
%type <stmt> stmt_return stmt_raise stmt_assert stmt_execsql
%type <stmt> stmt_dynexecute stmt_for stmt_perform stmt_call stmt_getdiag
%type <stmt> stmt_open stmt_fetch stmt_move stmt_close stmt_null
%type <stmt> stmt_commit stmt_rollback
%type <stmt> stmt_commit stmt_rollback stmt_set
%type <stmt> stmt_case stmt_foreach_a
%type <list> proc_exceptions
@ -327,6 +327,7 @@ static void check_raise_parameters(PLpgSQL_stmt_raise *stmt);
%token <keyword> K_QUERY
%token <keyword> K_RAISE
%token <keyword> K_RELATIVE
%token <keyword> K_RESET
%token <keyword> K_RESULT_OID
%token <keyword> K_RETURN
%token <keyword> K_RETURNED_SQLSTATE
@ -337,6 +338,7 @@ static void check_raise_parameters(PLpgSQL_stmt_raise *stmt);
%token <keyword> K_SCHEMA
%token <keyword> K_SCHEMA_NAME
%token <keyword> K_SCROLL
%token <keyword> K_SET
%token <keyword> K_SLICE
%token <keyword> K_SQLSTATE
%token <keyword> K_STACKED
@ -893,6 +895,8 @@ proc_stmt : pl_block ';'
{ $$ = $1; }
| stmt_rollback
{ $$ = $1; }
| stmt_set
{ $$ = $1; }
;
stmt_perform : K_PERFORM expr_until_semi
@ -2206,6 +2210,30 @@ stmt_rollback : K_ROLLBACK ';'
}
;
stmt_set : K_SET
{
PLpgSQL_stmt_set *new;
new = palloc0(sizeof(PLpgSQL_stmt_set));
new->cmd_type = PLPGSQL_STMT_SET;
new->lineno = plpgsql_location_to_lineno(@1);
new->expr = read_sql_stmt("SET ");
$$ = (PLpgSQL_stmt *)new;
}
| K_RESET
{
PLpgSQL_stmt_set *new;
new = palloc0(sizeof(PLpgSQL_stmt_set));
new->cmd_type = PLPGSQL_STMT_SET;
new->lineno = plpgsql_location_to_lineno(@1);
new->expr = read_sql_stmt("RESET ");
$$ = (PLpgSQL_stmt *)new;
}
;
cursor_variable : T_DATUM
{
@ -2494,6 +2522,7 @@ unreserved_keyword :
| K_QUERY
| K_RAISE
| K_RELATIVE
| K_RESET
| K_RESULT_OID
| K_RETURN
| K_RETURNED_SQLSTATE
@ -2504,6 +2533,7 @@ unreserved_keyword :
| K_SCHEMA
| K_SCHEMA_NAME
| K_SCROLL
| K_SET
| K_SLICE
| K_SQLSTATE
| K_STACKED