diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-10-10 08:53:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-10-10 08:53:14 +0000 |
commit | cd37a3bcaced9283c20baa52837c96b524baec54 (patch) | |
tree | 101b1c1487aa832a982dd635cd3b00d4d2ea3ae9 /sqlglot/dialects/postgres.py | |
parent | Releasing progress-linux version 18.11.2-1. (diff) | |
download | sqlglot-cd37a3bcaced9283c20baa52837c96b524baec54.tar.xz sqlglot-cd37a3bcaced9283c20baa52837c96b524baec54.zip |
Merging upstream version 18.11.6.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sqlglot/dialects/postgres.py')
-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, } |