[postgresql] Fixes for #4321, #4322 #4323
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes #4321 and #4322.
For #4321, the grammar rule
typename
was refactored from the gram.y. The second alt was removed because it added ambiguity.For #4322,
a_expr_caret
was corrected to follow the usual Floyd operator precedence grammar pattern. The inputSELECT 1 * 2 ^ 3 + 4;
is no longer ambiguous.Several other rules were corrected to remove some of the lingering pl/pgsql grammar rules, which caused ambiguity in
col_name_keyword
andc_expr
.As I progress in the clean up of this grammar, keep an eye on the list of rules with ambiguity. Before I started a couple of weeks ago, the list of ambiguous rules was this:
It is now this:
The readme was updated to reflect fixes to the grammar that removed Antlr Tool warnings.