diff options
Diffstat (limited to '')
-rw-r--r-- | sqlglot/dialects/postgres.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sqlglot/dialects/postgres.py b/sqlglot/dialects/postgres.py index 008727c..c435309 100644 --- a/sqlglot/dialects/postgres.py +++ b/sqlglot/dialects/postgres.py @@ -205,7 +205,7 @@ def _remove_target_from_merge(expression: exp.Expression) -> exp.Expression: for when in expression.expressions: when.transform( - lambda node: exp.column(node.name) + lambda node: exp.column(node.this) if isinstance(node, exp.Column) and normalize(node.args.get("table")) in targets else node, copy=False, @@ -439,6 +439,8 @@ class Postgres(Dialect): exp.TryCast: no_trycast_sql, exp.TsOrDsToDate: ts_or_ds_to_date_sql("postgres"), exp.UnixToTime: lambda self, e: f"TO_TIMESTAMP({self.sql(e, 'this')})", + exp.VariancePop: rename_func("VAR_POP"), + exp.Variance: rename_func("VAR_SAMP"), exp.Xor: bool_xor_sql, } |