Skip to content

Commit

Permalink
Fix: redshift doesn't support locks
Browse files Browse the repository at this point in the history
  • Loading branch information
tobymao committed Apr 28, 2023
1 parent c617e83 commit efd8c05
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions sqlglot/dialects/redshift.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ class Tokenizer(Postgres.Tokenizer):
SINGLE_TOKENS.pop("#")

class Generator(Postgres.Generator):
LOCKING_READS_SUPPORTED = False
SINGLE_STRING_INTERVAL = True

TYPE_MAPPING = {
Expand Down
1 change: 1 addition & 0 deletions tests/dialects/test_mysql.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ def test_mysql(self):
"mysql": "SELECT a FROM tbl FOR UPDATE",
"oracle": "SELECT a FROM tbl FOR UPDATE",
"postgres": "SELECT a FROM tbl FOR UPDATE",
"redshift": "SELECT a FROM tbl",
"tsql": "SELECT a FROM tbl FOR UPDATE",
},
)
Expand Down

0 comments on commit efd8c05

Please sign in to comment.