[jOOQ/jOOQ#9741] Avoid parser ambiguity with FOR UPDATE syntax

This commit is contained in:
Lukas Eder 2020-02-03 13:16:59 +01:00
parent 682985cf6f
commit f12fa801da

View File

@ -4967,7 +4967,12 @@ final class ParserImpl implements Parser {
}
else if (!peekKeyword(ctx, "FOR UPDATE") && parseKeywordIf(ctx, "FOR") && ctx.requireProEdition()) {
else if (peekKeyword(ctx, "FOR")
&& !peekKeyword(ctx, "FOR KEY SHARE")
&& !peekKeyword(ctx, "FOR NO KEY UPDATE")
&& !peekKeyword(ctx, "FOR SHARE")
&& !peekKeyword(ctx, "FOR UPDATE")
&& parseKeyword(ctx, "FOR") && ctx.requireProEdition()) {