fix(database): percent-encode spaces in Postgres connection URI (#9685)

Co-authored-by: Sayak Bhattacharya <sayak.b@Sayak-Bhattacharya-G092THXJ34.local>
This commit is contained in:
Sayak Bhattacharya
2025-10-06 23:14:38 +05:30
committed by GitHub
parent 6173586eeb
commit dbc113fe81

View File

@ -309,7 +309,7 @@ pub trait DbConnectionParams {
fn get_dbname(&self) -> &str; fn get_dbname(&self) -> &str;
fn get_database_url(&self, schema: &str) -> String { fn get_database_url(&self, schema: &str) -> String {
format!( format!(
"postgres://{}:{}@{}:{}/{}?application_name={}&options=-c search_path%3D{}", "postgres://{}:{}@{}:{}/{}?application_name={}&options=-c%20search_path%3D{}",
self.get_username(), self.get_username(),
self.get_password().peek(), self.get_password().peek(),
self.get_host(), self.get_host(),