-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
parser: add
QUERY
to bare_label_keyword
As revealed by #84309, some keywords not added to `bare_label_keywords` in `sql.y` will make the `SELECT ... <keyword>` statement error out, which is not compatible with postgres. This commit is to add the `QUERY` keyword per a support ticket. We're not adding the whole `unreserved_keyword` list here as having some of them in `bare_label_keyword`, such as `DAY`, bring `reduce` errors. Postgres: ``` postgres=# select substring('stringstringstring',1,10) query; query ------------ stringstri (1 row) ``` CRDB: ``` root@localhost:26257/defaultdb> select substring('stringstringstring',1,10) query; invalid syntax: statement ignored: at or near "query": syntax error SQLSTATE: 42601 DETAIL: source SQL: select substring('stringstringstring',1,10) query ^ ``` informs #84309 Release Note(bug fix): fixed the syntax error for `SELECT ... QUERY` (without AS) statement.
- Loading branch information
1 parent
4ae29e1
commit acfbf02
Showing
3 changed files
with
12 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters