Dev-iL commented on code in PR #67045:
URL: https://github.com/apache/airflow/pull/67045#discussion_r3393113350


##########
providers/postgres/src/airflow/providers/postgres/dialects/postgres.py:
##########
@@ -124,7 +126,13 @@ def generate_replace_sql(self, table, values, 
target_fields, **kwargs) -> str:
 
         sql = self.generate_insert_sql(table, values, target_fields, **kwargs)
         on_conflict_str = f" ON CONFLICT ({', '.join(map(self.escape_word, 
replace_index))})"
-        replace_target = [self.escape_word(f) for f in target_fields if f not 
in replace_index]
+
+        replace_target = kwargs.get("replace_target")
+
+        if replace_target is None:
+            replace_target = [self.escape_word(f) for f in target_fields if f 
not in replace_index]
+        else:
+            replace_target = [self.escape_word(f) for f in replace_target]

Review Comment:
   My bad, I mixed up "dialect" with "driver", must've been out of focus.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to