summaryrefslogtreecommitdiffstats
path: root/sqlglot/dialects/postgres.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-10-26 17:21:54 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-10-26 17:21:54 +0000
commitc03ba18c491e52cc85d8aae1825dd9e0b4f75e32 (patch)
treef76d58b50900be4bfd2dc15f0ec38d1a70d8417b /sqlglot/dialects/postgres.py
parentReleasing debian version 18.13.0-1. (diff)
downloadsqlglot-c03ba18c491e52cc85d8aae1825dd9e0b4f75e32.tar.xz
sqlglot-c03ba18c491e52cc85d8aae1825dd9e0b4f75e32.zip
Merging upstream version 18.17.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sqlglot/dialects/postgres.py')
-rw-r--r--sqlglot/dialects/postgres.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/sqlglot/dialects/postgres.py b/sqlglot/dialects/postgres.py
index c435309..086b278 100644
--- a/sqlglot/dialects/postgres.py
+++ b/sqlglot/dialects/postgres.py
@@ -20,7 +20,6 @@ from sqlglot.dialects.dialect import (
no_trycast_sql,
parse_timestamp_trunc,
rename_func,
- simplify_literal,
str_position_sql,
struct_extract_sql,
timestamptrunc_sql,
@@ -49,7 +48,7 @@ def _date_add_sql(kind: str) -> t.Callable[[Postgres.Generator, exp.DateAdd | ex
this = self.sql(expression, "this")
unit = expression.args.get("unit")
- expression = simplify_literal(expression).expression
+ expression = self._simplify_unless_literal(expression.expression)
if not isinstance(expression, exp.Literal):
self.unsupported("Cannot add non literal")