enchant3dmango commented on code in PR #47709:
URL: https://github.com/apache/airflow/pull/47709#discussion_r1992980888


##########
airflow/models/connection.py:
##########
@@ -256,6 +256,8 @@ def get_uri(self) -> str:
 
         if self.conn_type:
             uri = f"{self.conn_type.lower().replace('_', '-')}://"
+            if self.conn_type == "postgres":
+                uri = uri.replace("postgres://", "postgresql://", 1)

Review Comment:
   I think it's better to pass `postgres` or `postgresql` as a parameter (maybe 
adding an extra field in the connection form) instead of changing it for every 
postgres connection.
   
   Based on this 
[documentation](https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING-URIS),
 both should work.
   



-- 
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: commits-unsubscr...@airflow.apache.org

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

Reply via email to