Skip to content

Commit 02ffd14

Browse files
Ensure to use psycopg3 is used while connecting to postgres DB when PGADMIN_CONFIG_CONFIG_DATABASE_URI is specified.
1 parent 2f211dc commit 02ffd14

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

web/pgadmin/utils/check_external_config_db.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ def check_external_config_db(database_uri):
1515
Check if external config database exists if it
1616
is being used.
1717
"""
18+
if database_uri.startswith("postgresql://") or database_uri.startswith(
19+
"postgres://"):
20+
database_uri = database_uri.replace("://", "+psycopg://", 1)
1821
engine = create_engine(database_uri)
1922
try:
2023
connection = engine.connect()

0 commit comments

Comments
 (0)