dhuang opened a new issue, #34876:
URL: https://github.com/apache/airflow/issues/34876

   ### Apache Airflow version
   
   2.7.1
   
   ### What happened
   
   Currently Airflow normalizes conn types of `postgresql` to `postgres`, which 
means calling`Connection.get_uri()` always gets a `postgres://...` string. If 
we want to use this outside of the `PostgresHook` (which inverts this back in 
its 
[get_uri()](https://github.com/apache/airflow/blob/main/airflow/providers/postgres/hooks/postgres.py#L186)),
 you'll run into issues using the long deprecated `postgres` dialect.
   
   ### What you think should happen instead
   
   Seems like we should just invert the normalization? Happy to put a quick PR 
up if this is what we want.
   
   ### How to reproduce
   
   Call `Connection.get_uri()` on a connection with `conn_type` as `postgresql`.
   
   ### Operating System
   
   Debian 12
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Official Apache Airflow Helm Chart
   
   ### Deployment details
   
   _No response_
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


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