Open
Description
In #94408 we've introduced a regular expression in the SQL shell.
In commit fb09e01 we've introduced a mini-parser in the SQL shell go package.
Both of these things are architecturally incorrect -- we should have the server inspect the SQL syntax, as only the server has precise knowledge of the grammar that it recognizes.
There's a couple of solutions we can consider:
- lex and match the lexed tokens
- extend SHOW SYNTAX to reveals the token (using
parser.Tokens()
) in addition to the parsed syntax / errors
Jira issue: CRDB-24732