fix(postgres): include public schema in search_path for PostGIS functions (#1817)

This commit is contained in:
HaoNan Ye 2026-06-26 17:58:07 +08:00 committed by GitHub
parent bebed75265
commit 11ed3a0d3b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 2 deletions

View File

@ -1850,7 +1850,10 @@ pub async fn execute_query_with_schema_and_max_rows(
}
let set_schema_start = Instant::now();
client.execute(&format!("SET search_path TO {}", pg_quote_ident(schema)), &[]).await.map_err(pg_error_to_string)?;
client
.execute(&format!("SET search_path TO {}, public", pg_quote_ident(schema)), &[])
.await
.map_err(pg_error_to_string)?;
log::info!(
"[postgres][execute_with_schema:set-search-path:done] elapsed_ms={} total_ms={}",
set_schema_start.elapsed().as_millis(),
@ -1914,7 +1917,10 @@ pub async fn execute_query_with_schema_and_max_rows_and_cancel(
}
let set_schema_start = Instant::now();
client.execute(&format!("SET search_path TO {}", pg_quote_ident(schema)), &[]).await.map_err(pg_error_to_string)?;
client
.execute(&format!("SET search_path TO {}, public", pg_quote_ident(schema)), &[])
.await
.map_err(pg_error_to_string)?;
log::info!(
"[postgres][execute_with_schema:set-search-path:done] elapsed_ms={} total_ms={}",
set_schema_start.elapsed().as_millis(),