diff --git a/crates/dbx-core/src/db/postgres.rs b/crates/dbx-core/src/db/postgres.rs index 96f5eda80..47df3e1a7 100644 --- a/crates/dbx-core/src/db/postgres.rs +++ b/crates/dbx-core/src/db/postgres.rs @@ -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(),