We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5a0ad8c commit 9deef4fCopy full SHA for 9deef4f
src/driver/sqlx_postgres.rs
@@ -78,8 +78,15 @@ impl SqlxPostgresConnector {
78
}
79
let set_search_path_sql = options.schema_search_path.as_ref().map(|schema| {
80
let mut string = "SET search_path = ".to_owned();
81
- for schema in schema.split(',') {
82
- write!(&mut string, "\"{schema}\"").unwrap();
+ for (i, schema) in schema.split(',').enumerate() {
+ if i > 0 {
83
+ write!(&mut string, ",").unwrap();
84
+ }
85
+ if schema.starts_with('"') {
86
+ write!(&mut string, "{schema}").unwrap();
87
+ } else {
88
+ write!(&mut string, "\"{schema}\"").unwrap();
89
90
91
string
92
});
0 commit comments