@@ -1368,7 +1368,8 @@ for_control : for_variable K_IN
1368
1368
int tok = yylex (&yylval, &yylloc, yyscanner);
1369
1369
int tokloc = yylloc;
1370
1370
1371
- if (tok == K_EXECUTE)
1371
+ if (tok_is_keyword (tok, &yylval,
1372
+ K_EXECUTE, " execute" ))
1372
1373
{
1373
1374
/* EXECUTE means it's a dynamic FOR loop */
1374
1375
PLpgSQL_stmt_dynfors *new ;
@@ -2135,7 +2136,8 @@ stmt_open : K_OPEN cursor_variable
2135
2136
yyerror (&yylloc, NULL , yyscanner, " syntax error, expected \" FOR\" " );
2136
2137
2137
2138
tok = yylex (&yylval, &yylloc, yyscanner);
2138
- if (tok == K_EXECUTE)
2139
+ if (tok_is_keyword (tok, &yylval,
2140
+ K_EXECUTE, " execute" ))
2139
2141
{
2140
2142
int endtoken;
2141
2143
@@ -2536,6 +2538,7 @@ unreserved_keyword :
2536
2538
| K_ERRCODE
2537
2539
| K_ERROR
2538
2540
| K_EXCEPTION
2541
+ | K_EXECUTE
2539
2542
| K_EXIT
2540
2543
| K_FETCH
2541
2544
| K_FIRST
@@ -2581,6 +2584,7 @@ unreserved_keyword :
2581
2584
| K_SLICE
2582
2585
| K_SQLSTATE
2583
2586
| K_STACKED
2587
+ | K_STRICT
2584
2588
| K_TABLE
2585
2589
| K_TABLE_NAME
2586
2590
| K_TYPE
@@ -3514,7 +3518,8 @@ make_return_query_stmt(int location, YYSTYPE *yylvalp, YYLTYPE *yyllocp, yyscan_
3514
3518
new->stmtid = ++plpgsql_curr_compile->nstatements;
3515
3519
3516
3520
/* check for RETURN QUERY EXECUTE */
3517
- if ((tok = yylex(yylvalp, yyllocp, yyscanner)) != K_EXECUTE)
3521
+ tok = yylex(yylvalp, yyllocp, yyscanner);
3522
+ if (!tok_is_keyword(tok, yylvalp, K_EXECUTE, "execute"))
3518
3523
{
3519
3524
/* ordinary static query */
3520
3525
plpgsql_push_back_token(tok, yylvalp, yyllocp, yyscanner);
@@ -3597,7 +3602,7 @@ read_into_target(PLpgSQL_variable **target, bool *strict, YYSTYPE *yylvalp, YYLT
3597
3602
*strict = false;
3598
3603
3599
3604
tok = yylex(yylvalp, yyllocp, yyscanner);
3600
- if (strict && tok == K_STRICT)
3605
+ if (strict && tok_is_keyword( tok, yylvalp, K_STRICT, "strict") )
3601
3606
{
3602
3607
*strict = true;
3603
3608
tok = yylex(yylvalp, yyllocp, yyscanner);
0 commit comments