Skip to content

Commit

Permalink
fix postgresql connection string format
Browse files Browse the repository at this point in the history
  • Loading branch information
xfz11 committed Jul 1, 2024
1 parent 9408120 commit 232b5ed
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/serviceconnector-passwordless/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
Release History
===============
2.0.4
++++++
* Fix PostgreSQL connection string format

2.0.3
++++++
* Prompt confirmation when update PostgreSQL server
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@ def get_connection_string(self):
'az account get-access-token --resource-type oss-rdbms').get('accessToken')

# extension functions require the extension to be available, which is the case for postgres (default) database.
conn_string = "host={} user={} dbname=postgres password={} sslmode=require".format(
conn_string = "host={} user='{}' dbname=postgres password={} sslmode=require".format(
self.host, self.admin_username, password)
return conn_string

Expand Down Expand Up @@ -926,7 +926,7 @@ def get_connection_string(self):
'az account get-access-token --resource-type oss-rdbms').get('accessToken')

# extension functions require the extension to be available, which is the case for postgres (default) database.
conn_string = "host={} user={} dbname={} password={} sslmode=require".format(
conn_string = "host={} user='{}' dbname='{}' password={} sslmode=require".format(
self.host, self.admin_username + '@' + self.db_server, self.dbname, password)
return conn_string

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
# --------------------------------------------------------------------------------------------


VERSION = '2.0.3'
VERSION = '2.0.4'
NAME = 'serviceconnector-passwordless'

0 comments on commit 232b5ed

Please sign in to comment.