summaryrefslogtreecommitdiffstats
path: root/sqlglot/dialects/postgres.py
diff options
context:
space:
mode:
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 6418032..c709665 100644
--- a/sqlglot/dialects/postgres.py
+++ b/sqlglot/dialects/postgres.py
@@ -40,8 +40,7 @@ def _date_add_sql(kind):
expression = expression.copy()
expression.args["is_string"] = True
- expression = self.sql(expression)
- return f"{this} {kind} INTERVAL {expression} {unit}"
+ return f"{this} {kind} {self.sql(exp.Interval(this=expression, unit=unit))}"
return func