We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Support '' to escape single quote character in a string in Redshift dialect
**Fully reproducible code snippet**

```python
import sqlglot

sql_code = """
CREATE TABLE IF NOT EXISTS myschema.mytable (
    mycolumn bigint,
)
DISTKEY (mycolumn)
SORTKEY (mycolumn)
 ;
COMMENT ON COLUMN myschema.mytable.mycolumn IS 'my example = \\'working\\'';
COMMENT ON COLUMN myschema.mytable.mycolumn IS 'my example = ''not working''';
"""
expressions = sqlglot.parse(sql_code, read="redshift")
```

Error: 

```console
Traceback (most recent call last):
    ...
    raise error
sqlglot.errors.ParseError: Invalid expression / Unexpected token. Line 9, Col: 75.
  column IS 'my example = \'working\'';
COMMENT ON COLUMN myschema.mytable.mycolumn IS 'my example = ''not working''';
```

**Official Documentation**

I couldn't find the right documentation on AWS that explains this, but I ran the query on Redshift and it works perfectly.


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `sqlglot/dialects/redshift.py`
Content:
```
1 from __future__ import annotations
2 
3 import typing as t
4 
5 from sqlglot import exp, transforms
6 from sqlglot.dialects.dialect import (
7     concat_to_dpipe_sql,
8     concat_ws_to_dpipe_sql,
9     rename_func,
10     ts_or_ds_to_date_sql,
11 )
12 from sqlglot.dialects.postgres import Postgres
13 from sqlglot.helper import seq_get
14 from sqlglot.tokens import TokenType
15 
16 
17 def _json_sql(self: Redshift.Generator, expression: exp.JSONExtract | exp.JSONExtractScalar) -> str:
18     return f'{self.sql(expression, "this")}."{expression.expression.name}"'
19 
20 
21 def _parse_date_add(args: t.List) -> exp.DateAdd:
22     return exp.DateAdd(
23         this=exp.TsOrDsToDate(this=seq_get(args, 2)),
24         expression=seq_get(args, 1),
25         unit=seq_get(args, 0),
26     )
27 
28 
29 class Redshift(Postgres):
30     # https://docs.aws.amazon.com/redshift/latest/dg/r_names.html
31     RESOLVES_IDENTIFIERS_AS_UPPERCASE = None
32 
33     SUPPORTS_USER_DEFINED_TYPES = False
34 
35     TIME_FORMAT = "'YYYY-MM-DD HH:MI:SS'"
36     TIME_MAPPING = {
37         **Postgres.TIME_MAPPING,
38         "MON": "%b",
39         "HH": "%H",
40     }
41 
42     class Parser(Postgres.Parser):
43         FUNCTIONS = {
44             **Postgres.Parser.FUNCTIONS,
45             "ADD_MONTHS": lambda args: exp.DateAdd(
46                 this=exp.TsOrDsToDate(this=seq_get(args, 0)),
47                 expression=seq_get(args, 1),
48                 unit=exp.var("month"),
49             ),
50             "DATEADD": _parse_date_add,
51             "DATE_ADD": _parse_date_add,
52             "DATEDIFF": lambda args: exp.DateDiff(
53                 this=exp.TsOrDsToDate(this=seq_get(args, 2)),
54                 expression=exp.TsOrDsToDate(this=seq_get(args, 1)),
55                 unit=seq_get(args, 0),
56             ),
57             "STRTOL": exp.FromBase.from_arg_list,
58         }
59 
60         def _parse_types(
61             self, check_func: bool = False, schema: bool = False, allow_identifiers: bool = True
62         ) -> t.Optional[exp.Expression]:
63             this = super()._parse_types(
64                 check_func=check_func, schema=schema, allow_identifiers=allow_identifiers
65             )
66 
67             if (
68                 isinstance(this, exp.DataType)
69                 and this.is_type("varchar")
70                 and this.expressions
71                 and this.expressions[0].this == exp.column("MAX")
72             ):
73                 this.set("expressions", [exp.var("MAX")])
74 
75             return this
76 
77         def _parse_convert(self, strict: bool) -> t.Optional[exp.Expression]:
78             to = self._parse_types()
79             self._match(TokenType.COMMA)
80             this = self._parse_bitwise()
81             return self.expression(exp.TryCast, this=this, to=to)
82 
83     class Tokenizer(Postgres.Tokenizer):
84         BIT_STRINGS = []
85         HEX_STRINGS = []
86         STRING_ESCAPES = ["\\"]
87 
88         KEYWORDS = {
89             **Postgres.Tokenizer.KEYWORDS,
90             "HLLSKETCH": TokenType.HLLSKETCH,
91             "SUPER": TokenType.SUPER,
92             "SYSDATE": TokenType.CURRENT_TIMESTAMP,
93             "TOP": TokenType.TOP,
94             "UNLOAD": TokenType.COMMAND,
95             "VARBYTE": TokenType.VARBINARY,
96         }
97 
98         # Redshift allows # to appear as a table identifier prefix
99         SINGLE_TOKENS = Postgres.Tokenizer.SINGLE_TOKENS.copy()
100         SINGLE_TOKENS.pop("#")
101 
102     class Generator(Postgres.Generator):
103         LOCKING_READS_SUPPORTED = False
104         RENAME_TABLE_WITH_DB = False
105         QUERY_HINTS = False
106         VALUES_AS_TABLE = False
107         TZ_TO_WITH_TIME_ZONE = True
108         NVL2_SUPPORTED = True
109 
110         TYPE_MAPPING = {
111             **Postgres.Generator.TYPE_MAPPING,
112             exp.DataType.Type.BINARY: "VARBYTE",
113             exp.DataType.Type.INT: "INTEGER",
114             exp.DataType.Type.TIMETZ: "TIME",
115             exp.DataType.Type.TIMESTAMPTZ: "TIMESTAMP",
116             exp.DataType.Type.VARBINARY: "VARBYTE",
117         }
118 
119         PROPERTIES_LOCATION = {
120             **Postgres.Generator.PROPERTIES_LOCATION,
121             exp.LikeProperty: exp.Properties.Location.POST_WITH,
122         }
123 
124         TRANSFORMS = {
125             **Postgres.Generator.TRANSFORMS,
126             exp.Concat: concat_to_dpipe_sql,
127             exp.ConcatWs: concat_ws_to_dpipe_sql,
128             exp.CurrentTimestamp: lambda self, e: "SYSDATE",
129             exp.DateAdd: lambda self, e: self.func(
130                 "DATEADD", exp.var(e.text("unit") or "day"), e.expression, e.this
131             ),
132             exp.DateDiff: lambda self, e: self.func(
133                 "DATEDIFF", exp.var(e.text("unit") or "day"), e.expression, e.this
134             ),
135             exp.DistKeyProperty: lambda self, e: f"DISTKEY({e.name})",
136             exp.DistStyleProperty: lambda self, e: self.naked_property(e),
137             exp.FromBase: rename_func("STRTOL"),
138             exp.JSONExtract: _json_sql,
139             exp.JSONExtractScalar: _json_sql,
140             exp.SafeConcat: concat_to_dpipe_sql,
141             exp.Select: transforms.preprocess(
142                 [transforms.eliminate_distinct_on, transforms.eliminate_semi_and_anti_joins]
143             ),
144             exp.SortKeyProperty: lambda self, e: f"{'COMPOUND ' if e.args['compound'] else ''}SORTKEY({self.format_args(*e.this)})",
145             exp.TsOrDsToDate: ts_or_ds_to_date_sql("redshift"),
146         }
147 
148         # Postgres maps exp.Pivot to no_pivot_sql, but Redshift support pivots
149         TRANSFORMS.pop(exp.Pivot)
150 
151         # Redshift uses the POW | POWER (expr1, expr2) syntax instead of expr1 ^ expr2 (postgres)
152         TRANSFORMS.pop(exp.Pow)
153 
154         # Redshift supports ANY_VALUE(..)
155         TRANSFORMS.pop(exp.AnyValue)
156 
157         RESERVED_KEYWORDS = {*Postgres.Generator.RESERVED_KEYWORDS, "snapshot", "type"}
158 
159         def with_properties(self, properties: exp.Properties) -> str:
160             """Redshift doesn't have `WITH` as part of their with_properties so we remove it"""
161             return self.properties(properties, prefix=" ", suffix="")
162 
163         def datatype_sql(self, expression: exp.DataType) -> str:
164             """
165             Redshift converts the `TEXT` data type to `VARCHAR(255)` by default when people more generally mean
166             VARCHAR of max length which is `VARCHAR(max)` in Redshift. Therefore if we get a `TEXT` data type
167             without precision we convert it to `VARCHAR(max)` and if it does have precision then we just convert
168             `TEXT` to `VARCHAR`.
169             """
170             if expression.is_type("text"):
171                 expression = expression.copy()
172                 expression.set("this", exp.DataType.Type.VARCHAR)
173                 precision = expression.args.get("expressions")
174 
175                 if not precision:
176                     expression.append("expressions", exp.var("MAX"))
177 
178             return super().datatype_sql(expression)
179
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/sqlglot/dialects/redshift.py b/sqlglot/dialects/redshift.py
--- a/sqlglot/dialects/redshift.py
+++ b/sqlglot/dialects/redshift.py
@@ -83,7 +83,7 @@
     class Tokenizer(Postgres.Tokenizer):
         BIT_STRINGS = []
         HEX_STRINGS = []
-        STRING_ESCAPES = ["\\"]
+        STRING_ESCAPES = ["\\", "'"]
 
         KEYWORDS = {
             **Postgres.Tokenizer.KEYWORDS,

{"golden_diff": "diff --git a/sqlglot/dialects/redshift.py b/sqlglot/dialects/redshift.py\n--- a/sqlglot/dialects/redshift.py\n+++ b/sqlglot/dialects/redshift.py\n@@ -83,7 +83,7 @@\n     class Tokenizer(Postgres.Tokenizer):\n         BIT_STRINGS = []\n         HEX_STRINGS = []\n-        STRING_ESCAPES = [\"\\\\\"]\n+        STRING_ESCAPES = [\"\\\\\", \"'\"]\n \n         KEYWORDS = {\n             **Postgres.Tokenizer.KEYWORDS,\n", "issue": "Support '' to escape single quote character in a string in Redshift dialect\n**Fully reproducible code snippet**\r\n\r\n```python\r\nimport sqlglot\r\n\r\nsql_code = \"\"\"\r\nCREATE TABLE IF NOT EXISTS myschema.mytable (\r\n    mycolumn bigint,\r\n)\r\nDISTKEY (mycolumn)\r\nSORTKEY (mycolumn)\r\n ;\r\nCOMMENT ON COLUMN myschema.mytable.mycolumn IS 'my example = \\\\'working\\\\'';\r\nCOMMENT ON COLUMN myschema.mytable.mycolumn IS 'my example = ''not working''';\r\n\"\"\"\r\nexpressions = sqlglot.parse(sql_code, read=\"redshift\")\r\n```\r\n\r\nError: \r\n\r\n```console\r\nTraceback (most recent call last):\r\n    ...\r\n    raise error\r\nsqlglot.errors.ParseError: Invalid expression / Unexpected token. Line 9, Col: 75.\r\n  column IS 'my example = \\'working\\'';\r\nCOMMENT ON COLUMN myschema.mytable.mycolumn IS 'my example = ''not working''';\r\n```\r\n\r\n**Official Documentation**\r\n\r\nI couldn't find the right documentation on AWS that explains this, but I ran the query on Redshift and it works perfectly.\r\n\n", "before_files": [{"content": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp, transforms\nfrom sqlglot.dialects.dialect import (\n    concat_to_dpipe_sql,\n    concat_ws_to_dpipe_sql,\n    rename_func,\n    ts_or_ds_to_date_sql,\n)\nfrom sqlglot.dialects.postgres import Postgres\nfrom sqlglot.helper import seq_get\nfrom sqlglot.tokens import TokenType\n\n\ndef _json_sql(self: Redshift.Generator, expression: exp.JSONExtract | exp.JSONExtractScalar) -> str:\n    return f'{self.sql(expression, \"this\")}.\"{expression.expression.name}\"'\n\n\ndef _parse_date_add(args: t.List) -> exp.DateAdd:\n    return exp.DateAdd(\n        this=exp.TsOrDsToDate(this=seq_get(args, 2)),\n        expression=seq_get(args, 1),\n        unit=seq_get(args, 0),\n    )\n\n\nclass Redshift(Postgres):\n    # https://docs.aws.amazon.com/redshift/latest/dg/r_names.html\n    RESOLVES_IDENTIFIERS_AS_UPPERCASE = None\n\n    SUPPORTS_USER_DEFINED_TYPES = False\n\n    TIME_FORMAT = \"'YYYY-MM-DD HH:MI:SS'\"\n    TIME_MAPPING = {\n        **Postgres.TIME_MAPPING,\n        \"MON\": \"%b\",\n        \"HH\": \"%H\",\n    }\n\n    class Parser(Postgres.Parser):\n        FUNCTIONS = {\n            **Postgres.Parser.FUNCTIONS,\n            \"ADD_MONTHS\": lambda args: exp.DateAdd(\n                this=exp.TsOrDsToDate(this=seq_get(args, 0)),\n                expression=seq_get(args, 1),\n                unit=exp.var(\"month\"),\n            ),\n            \"DATEADD\": _parse_date_add,\n            \"DATE_ADD\": _parse_date_add,\n            \"DATEDIFF\": lambda args: exp.DateDiff(\n                this=exp.TsOrDsToDate(this=seq_get(args, 2)),\n                expression=exp.TsOrDsToDate(this=seq_get(args, 1)),\n                unit=seq_get(args, 0),\n            ),\n            \"STRTOL\": exp.FromBase.from_arg_list,\n        }\n\n        def _parse_types(\n            self, check_func: bool = False, schema: bool = False, allow_identifiers: bool = True\n        ) -> t.Optional[exp.Expression]:\n            this = super()._parse_types(\n                check_func=check_func, schema=schema, allow_identifiers=allow_identifiers\n            )\n\n            if (\n                isinstance(this, exp.DataType)\n                and this.is_type(\"varchar\")\n                and this.expressions\n                and this.expressions[0].this == exp.column(\"MAX\")\n            ):\n                this.set(\"expressions\", [exp.var(\"MAX\")])\n\n            return this\n\n        def _parse_convert(self, strict: bool) -> t.Optional[exp.Expression]:\n            to = self._parse_types()\n            self._match(TokenType.COMMA)\n            this = self._parse_bitwise()\n            return self.expression(exp.TryCast, this=this, to=to)\n\n    class Tokenizer(Postgres.Tokenizer):\n        BIT_STRINGS = []\n        HEX_STRINGS = []\n        STRING_ESCAPES = [\"\\\\\"]\n\n        KEYWORDS = {\n            **Postgres.Tokenizer.KEYWORDS,\n            \"HLLSKETCH\": TokenType.HLLSKETCH,\n            \"SUPER\": TokenType.SUPER,\n            \"SYSDATE\": TokenType.CURRENT_TIMESTAMP,\n            \"TOP\": TokenType.TOP,\n            \"UNLOAD\": TokenType.COMMAND,\n            \"VARBYTE\": TokenType.VARBINARY,\n        }\n\n        # Redshift allows # to appear as a table identifier prefix\n        SINGLE_TOKENS = Postgres.Tokenizer.SINGLE_TOKENS.copy()\n        SINGLE_TOKENS.pop(\"#\")\n\n    class Generator(Postgres.Generator):\n        LOCKING_READS_SUPPORTED = False\n        RENAME_TABLE_WITH_DB = False\n        QUERY_HINTS = False\n        VALUES_AS_TABLE = False\n        TZ_TO_WITH_TIME_ZONE = True\n        NVL2_SUPPORTED = True\n\n        TYPE_MAPPING = {\n            **Postgres.Generator.TYPE_MAPPING,\n            exp.DataType.Type.BINARY: \"VARBYTE\",\n            exp.DataType.Type.INT: \"INTEGER\",\n            exp.DataType.Type.TIMETZ: \"TIME\",\n            exp.DataType.Type.TIMESTAMPTZ: \"TIMESTAMP\",\n            exp.DataType.Type.VARBINARY: \"VARBYTE\",\n        }\n\n        PROPERTIES_LOCATION = {\n            **Postgres.Generator.PROPERTIES_LOCATION,\n            exp.LikeProperty: exp.Properties.Location.POST_WITH,\n        }\n\n        TRANSFORMS = {\n            **Postgres.Generator.TRANSFORMS,\n            exp.Concat: concat_to_dpipe_sql,\n            exp.ConcatWs: concat_ws_to_dpipe_sql,\n            exp.CurrentTimestamp: lambda self, e: \"SYSDATE\",\n            exp.DateAdd: lambda self, e: self.func(\n                \"DATEADD\", exp.var(e.text(\"unit\") or \"day\"), e.expression, e.this\n            ),\n            exp.DateDiff: lambda self, e: self.func(\n                \"DATEDIFF\", exp.var(e.text(\"unit\") or \"day\"), e.expression, e.this\n            ),\n            exp.DistKeyProperty: lambda self, e: f\"DISTKEY({e.name})\",\n            exp.DistStyleProperty: lambda self, e: self.naked_property(e),\n            exp.FromBase: rename_func(\"STRTOL\"),\n            exp.JSONExtract: _json_sql,\n            exp.JSONExtractScalar: _json_sql,\n            exp.SafeConcat: concat_to_dpipe_sql,\n            exp.Select: transforms.preprocess(\n                [transforms.eliminate_distinct_on, transforms.eliminate_semi_and_anti_joins]\n            ),\n            exp.SortKeyProperty: lambda self, e: f\"{'COMPOUND ' if e.args['compound'] else ''}SORTKEY({self.format_args(*e.this)})\",\n            exp.TsOrDsToDate: ts_or_ds_to_date_sql(\"redshift\"),\n        }\n\n        # Postgres maps exp.Pivot to no_pivot_sql, but Redshift support pivots\n        TRANSFORMS.pop(exp.Pivot)\n\n        # Redshift uses the POW | POWER (expr1, expr2) syntax instead of expr1 ^ expr2 (postgres)\n        TRANSFORMS.pop(exp.Pow)\n\n        # Redshift supports ANY_VALUE(..)\n        TRANSFORMS.pop(exp.AnyValue)\n\n        RESERVED_KEYWORDS = {*Postgres.Generator.RESERVED_KEYWORDS, \"snapshot\", \"type\"}\n\n        def with_properties(self, properties: exp.Properties) -> str:\n            \"\"\"Redshift doesn't have `WITH` as part of their with_properties so we remove it\"\"\"\n            return self.properties(properties, prefix=\" \", suffix=\"\")\n\n        def datatype_sql(self, expression: exp.DataType) -> str:\n            \"\"\"\n            Redshift converts the `TEXT` data type to `VARCHAR(255)` by default when people more generally mean\n            VARCHAR of max length which is `VARCHAR(max)` in Redshift. Therefore if we get a `TEXT` data type\n            without precision we convert it to `VARCHAR(max)` and if it does have precision then we just convert\n            `TEXT` to `VARCHAR`.\n            \"\"\"\n            if expression.is_type(\"text\"):\n                expression = expression.copy()\n                expression.set(\"this\", exp.DataType.Type.VARCHAR)\n                precision = expression.args.get(\"expressions\")\n\n                if not precision:\n                    expression.append(\"expressions\", exp.var(\"MAX\"))\n\n            return super().datatype_sql(expression)\n", "path": "sqlglot/dialects/redshift.py"}], "after_files": [{"content": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp, transforms\nfrom sqlglot.dialects.dialect import (\n    concat_to_dpipe_sql,\n    concat_ws_to_dpipe_sql,\n    rename_func,\n    ts_or_ds_to_date_sql,\n)\nfrom sqlglot.dialects.postgres import Postgres\nfrom sqlglot.helper import seq_get\nfrom sqlglot.tokens import TokenType\n\n\ndef _json_sql(self: Redshift.Generator, expression: exp.JSONExtract | exp.JSONExtractScalar) -> str:\n    return f'{self.sql(expression, \"this\")}.\"{expression.expression.name}\"'\n\n\ndef _parse_date_add(args: t.List) -> exp.DateAdd:\n    return exp.DateAdd(\n        this=exp.TsOrDsToDate(this=seq_get(args, 2)),\n        expression=seq_get(args, 1),\n        unit=seq_get(args, 0),\n    )\n\n\nclass Redshift(Postgres):\n    # https://docs.aws.amazon.com/redshift/latest/dg/r_names.html\n    RESOLVES_IDENTIFIERS_AS_UPPERCASE = None\n\n    SUPPORTS_USER_DEFINED_TYPES = False\n\n    TIME_FORMAT = \"'YYYY-MM-DD HH:MI:SS'\"\n    TIME_MAPPING = {\n        **Postgres.TIME_MAPPING,\n        \"MON\": \"%b\",\n        \"HH\": \"%H\",\n    }\n\n    class Parser(Postgres.Parser):\n        FUNCTIONS = {\n            **Postgres.Parser.FUNCTIONS,\n            \"ADD_MONTHS\": lambda args: exp.DateAdd(\n                this=exp.TsOrDsToDate(this=seq_get(args, 0)),\n                expression=seq_get(args, 1),\n                unit=exp.var(\"month\"),\n            ),\n            \"DATEADD\": _parse_date_add,\n            \"DATE_ADD\": _parse_date_add,\n            \"DATEDIFF\": lambda args: exp.DateDiff(\n                this=exp.TsOrDsToDate(this=seq_get(args, 2)),\n                expression=exp.TsOrDsToDate(this=seq_get(args, 1)),\n                unit=seq_get(args, 0),\n            ),\n            \"STRTOL\": exp.FromBase.from_arg_list,\n        }\n\n        def _parse_types(\n            self, check_func: bool = False, schema: bool = False, allow_identifiers: bool = True\n        ) -> t.Optional[exp.Expression]:\n            this = super()._parse_types(\n                check_func=check_func, schema=schema, allow_identifiers=allow_identifiers\n            )\n\n            if (\n                isinstance(this, exp.DataType)\n                and this.is_type(\"varchar\")\n                and this.expressions\n                and this.expressions[0].this == exp.column(\"MAX\")\n            ):\n                this.set(\"expressions\", [exp.var(\"MAX\")])\n\n            return this\n\n        def _parse_convert(self, strict: bool) -> t.Optional[exp.Expression]:\n            to = self._parse_types()\n            self._match(TokenType.COMMA)\n            this = self._parse_bitwise()\n            return self.expression(exp.TryCast, this=this, to=to)\n\n    class Tokenizer(Postgres.Tokenizer):\n        BIT_STRINGS = []\n        HEX_STRINGS = []\n        STRING_ESCAPES = [\"\\\\\", \"'\"]\n\n        KEYWORDS = {\n            **Postgres.Tokenizer.KEYWORDS,\n            \"HLLSKETCH\": TokenType.HLLSKETCH,\n            \"SUPER\": TokenType.SUPER,\n            \"SYSDATE\": TokenType.CURRENT_TIMESTAMP,\n            \"TOP\": TokenType.TOP,\n            \"UNLOAD\": TokenType.COMMAND,\n            \"VARBYTE\": TokenType.VARBINARY,\n        }\n\n        # Redshift allows # to appear as a table identifier prefix\n        SINGLE_TOKENS = Postgres.Tokenizer.SINGLE_TOKENS.copy()\n        SINGLE_TOKENS.pop(\"#\")\n\n    class Generator(Postgres.Generator):\n        LOCKING_READS_SUPPORTED = False\n        RENAME_TABLE_WITH_DB = False\n        QUERY_HINTS = False\n        VALUES_AS_TABLE = False\n        TZ_TO_WITH_TIME_ZONE = True\n        NVL2_SUPPORTED = True\n\n        TYPE_MAPPING = {\n            **Postgres.Generator.TYPE_MAPPING,\n            exp.DataType.Type.BINARY: \"VARBYTE\",\n            exp.DataType.Type.INT: \"INTEGER\",\n            exp.DataType.Type.TIMETZ: \"TIME\",\n            exp.DataType.Type.TIMESTAMPTZ: \"TIMESTAMP\",\n            exp.DataType.Type.VARBINARY: \"VARBYTE\",\n        }\n\n        PROPERTIES_LOCATION = {\n            **Postgres.Generator.PROPERTIES_LOCATION,\n            exp.LikeProperty: exp.Properties.Location.POST_WITH,\n        }\n\n        TRANSFORMS = {\n            **Postgres.Generator.TRANSFORMS,\n            exp.Concat: concat_to_dpipe_sql,\n            exp.ConcatWs: concat_ws_to_dpipe_sql,\n            exp.CurrentTimestamp: lambda self, e: \"SYSDATE\",\n            exp.DateAdd: lambda self, e: self.func(\n                \"DATEADD\", exp.var(e.text(\"unit\") or \"day\"), e.expression, e.this\n            ),\n            exp.DateDiff: lambda self, e: self.func(\n                \"DATEDIFF\", exp.var(e.text(\"unit\") or \"day\"), e.expression, e.this\n            ),\n            exp.DistKeyProperty: lambda self, e: f\"DISTKEY({e.name})\",\n            exp.DistStyleProperty: lambda self, e: self.naked_property(e),\n            exp.FromBase: rename_func(\"STRTOL\"),\n            exp.JSONExtract: _json_sql,\n            exp.JSONExtractScalar: _json_sql,\n            exp.SafeConcat: concat_to_dpipe_sql,\n            exp.Select: transforms.preprocess(\n                [transforms.eliminate_distinct_on, transforms.eliminate_semi_and_anti_joins]\n            ),\n            exp.SortKeyProperty: lambda self, e: f\"{'COMPOUND ' if e.args['compound'] else ''}SORTKEY({self.format_args(*e.this)})\",\n            exp.TsOrDsToDate: ts_or_ds_to_date_sql(\"redshift\"),\n        }\n\n        # Postgres maps exp.Pivot to no_pivot_sql, but Redshift support pivots\n        TRANSFORMS.pop(exp.Pivot)\n\n        # Redshift uses the POW | POWER (expr1, expr2) syntax instead of expr1 ^ expr2 (postgres)\n        TRANSFORMS.pop(exp.Pow)\n\n        # Redshift supports ANY_VALUE(..)\n        TRANSFORMS.pop(exp.AnyValue)\n\n        RESERVED_KEYWORDS = {*Postgres.Generator.RESERVED_KEYWORDS, \"snapshot\", \"type\"}\n\n        def with_properties(self, properties: exp.Properties) -> str:\n            \"\"\"Redshift doesn't have `WITH` as part of their with_properties so we remove it\"\"\"\n            return self.properties(properties, prefix=\" \", suffix=\"\")\n\n        def datatype_sql(self, expression: exp.DataType) -> str:\n            \"\"\"\n            Redshift converts the `TEXT` data type to `VARCHAR(255)` by default when people more generally mean\n            VARCHAR of max length which is `VARCHAR(max)` in Redshift. Therefore if we get a `TEXT` data type\n            without precision we convert it to `VARCHAR(max)` and if it does have precision then we just convert\n            `TEXT` to `VARCHAR`.\n            \"\"\"\n            if expression.is_type(\"text\"):\n                expression = expression.copy()\n                expression.set(\"this\", exp.DataType.Type.VARCHAR)\n                precision = expression.args.get(\"expressions\")\n\n                if not precision:\n                    expression.append(\"expressions\", exp.var(\"MAX\"))\n\n            return super().datatype_sql(expression)\n", "path": "sqlglot/dialects/redshift.py"}]}