Skip to content

Commit

Permalink
sql/parser: Added current_schema keyword support.
Browse files Browse the repository at this point in the history
current_schema can be used as an alias for the current_schema() builtin.
It is used by some applications like Keycloak.
  • Loading branch information
CMajeri committed Jul 7, 2017
1 parent cd116f9 commit a696032
Show file tree
Hide file tree
Showing 5 changed files with 4,390 additions and 4,373 deletions.
1 change: 1 addition & 0 deletions pkg/sql/parser/keywords.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions pkg/sql/parser/parse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -805,6 +805,8 @@ func TestParse2(t *testing.T) {
{`SELECT a FROM t1 RIGHT OUTER JOIN t2 ON a = b`,
`SELECT a FROM t1 RIGHT JOIN t2 ON a = b`},
// Some functions are nearly keywords.
{`SELECT CURRENT_SCHEMA`,
`SELECT current_schema()`},
{`SELECT CURRENT_TIMESTAMP`,
`SELECT current_timestamp()`},
{`SELECT CURRENT_DATE`,
Expand Down
1 change: 1 addition & 0 deletions pkg/sql/parser/reserved_keywords.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a696032

Please sign in to comment.