jedcunningham commented on a change in pull request #17423:
URL: https://github.com/apache/airflow/pull/17423#discussion_r683009731



##########
File path: airflow/providers/postgres/hooks/postgres.py
##########
@@ -70,6 +70,7 @@ def __init__(self, *args, **kwargs) -> None:
         super().__init__(*args, **kwargs)
         self.connection: Optional[Connection] = kwargs.pop("connection", None)
         self.conn: connection = None
+        self.schema: Optional[str] = kwargs.pop("schema", None)

Review comment:
       Sorry, I should have included an example. This is what I meant:
   
   ```
   h = SomeHook(schema="foo")
   h.get_uri() # uses foo
   h.schema = "bar"
   h.get_uri() # still uses foo because of __schema
   ```
   
   That's why I'm thinking letting both `DbApiHook` and any derived hooks both 
set `schema` might be the best of both worlds here? Then the derived hooks 
could stop setting `schema` in Airflow 3 (or the next time they get a min core 
version bump really).




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