You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/03/26 11:10:19 UTC

[GitHub] [airflow] ashb commented on a change in pull request #15012: PostgreSQL operator returns query result

ashb commented on a change in pull request #15012:
URL: https://github.com/apache/airflow/pull/15012#discussion_r602196220



##########
File path: airflow/providers/postgres/operators/postgres.py
##########
@@ -68,6 +68,7 @@ def __init__(
     def execute(self, context):
         self.log.info('Executing: %s', self.sql)
         self.hook = PostgresHook(postgres_conn_id=self.postgres_conn_id, schema=self.database)
-        self.hook.run(self.sql, self.autocommit, parameters=self.parameters)
+        result = self.hook.run(self.sql, self.autocommit, parameters=self.parameters)
         for output in self.hook.conn.notices:
             self.log.info(output)
+        return result

Review comment:
       ```suggestion
           if self.do_xcom_push:
               return result
   ```




-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org