diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-09-12 08:28:54 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-09-12 08:28:54 +0000 |
commit | 7db33518a4264e422294a1e20fbd1c1505d9a62d (patch) | |
tree | aeb9ae54563b1f8f9c26fd54d0c207b082b89cd4 /sqlglot/dialects/postgres.py | |
parent | Releasing debian version 18.2.0-1. (diff) | |
download | sqlglot-7db33518a4264e422294a1e20fbd1c1505d9a62d.tar.xz sqlglot-7db33518a4264e422294a1e20fbd1c1505d9a62d.zip |
Merging upstream version 18.3.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sqlglot/dialects/postgres.py')
-rw-r--r-- | sqlglot/dialects/postgres.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sqlglot/dialects/postgres.py b/sqlglot/dialects/postgres.py index c26e121..5027013 100644 --- a/sqlglot/dialects/postgres.py +++ b/sqlglot/dialects/postgres.py @@ -190,7 +190,11 @@ def _remove_target_from_merge(expression: exp.Expression) -> exp.Expression: if isinstance(expression, exp.Merge): alias = expression.this.args.get("alias") - normalize = lambda identifier: Postgres.normalize_identifier(identifier).name + normalize = ( + lambda identifier: Postgres.normalize_identifier(identifier).name + if identifier + else None + ) targets = {normalize(expression.this.this)} |