Skip to content

Commit

Permalink
parser: parse RESET ROLE
Browse files Browse the repository at this point in the history
Release note (sql change): Allow `RESET ROLE` to be parsed. This is not
yet implemented.
  • Loading branch information
otan committed Aug 12, 2021
1 parent 6eaa636 commit bd4eaa6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/generated/sql/bnf/stmt_block.bnf
Original file line number Diff line number Diff line change
Expand Up @@ -1515,6 +1515,7 @@ session_var ::=
| 'ALL'
| 'DATABASE'
| 'NAMES'
| 'ROLE'
| 'SESSION_USER'
| 'TIME' 'ZONE'

Expand Down
3 changes: 3 additions & 0 deletions pkg/sql/logictest/testdata/logic_test/user
Original file line number Diff line number Diff line change
Expand Up @@ -192,3 +192,6 @@ SET ROLE = 'testuser'

statement error unimplemented
SET ROLE testuser

statement error unimplemented
RESET ROLE
1 change: 1 addition & 0 deletions pkg/sql/parser/sql.y
Original file line number Diff line number Diff line change
Expand Up @@ -4879,6 +4879,7 @@ session_var:
// SET NAMES is standard SQL for SET client_encoding.
// See https://www.postgresql.org/docs/9.6/static/multibyte.html#AEN39236
| NAMES { $$ = "client_encoding" }
| ROLE
| SESSION_USER
// TIME ZONE is special: it is two tokens, but is really the identifier "TIME ZONE".
| TIME ZONE { $$ = "timezone" }
Expand Down

0 comments on commit bd4eaa6

Please sign in to comment.