diff options
Diffstat (limited to 'sqlglot/dialects')
-rw-r--r-- | sqlglot/dialects/hive.py | 1 | ||||
-rw-r--r-- | sqlglot/dialects/postgres.py | 1 | ||||
-rw-r--r-- | sqlglot/dialects/tsql.py | 6 |
3 files changed, 8 insertions, 0 deletions
diff --git a/sqlglot/dialects/hive.py b/sqlglot/dialects/hive.py index 70c1c6c..8d6e1ae 100644 --- a/sqlglot/dialects/hive.py +++ b/sqlglot/dialects/hive.py @@ -250,6 +250,7 @@ class Hive(Dialect): TYPE_MAPPING = { **generator.Generator.TYPE_MAPPING, exp.DataType.Type.TEXT: "STRING", + exp.DataType.Type.DATETIME: "TIMESTAMP", exp.DataType.Type.VARBINARY: "BINARY", } diff --git a/sqlglot/dialects/postgres.py b/sqlglot/dialects/postgres.py index 1cb5025..f276af1 100644 --- a/sqlglot/dialects/postgres.py +++ b/sqlglot/dialects/postgres.py @@ -244,6 +244,7 @@ class Postgres(Dialect): class Parser(parser.Parser): STRICT_CAST = False + LATERAL_FUNCTION_AS_VIEW = True FUNCTIONS = { **parser.Parser.FUNCTIONS, diff --git a/sqlglot/dialects/tsql.py b/sqlglot/dialects/tsql.py index 07ce38b..a552e7b 100644 --- a/sqlglot/dialects/tsql.py +++ b/sqlglot/dialects/tsql.py @@ -224,6 +224,12 @@ class TSQL(Dialect): class Tokenizer(tokens.Tokenizer): IDENTIFIERS = ['"', ("[", "]")] + QUOTES = [ + (prefix + quote, quote) if prefix else quote + for quote in ["'", '"'] + for prefix in ["", "n", "N"] + ] + KEYWORDS = { **tokens.Tokenizer.KEYWORDS, "BIT": TokenType.BOOLEAN, |