From c9a95a1d2595d8628e765214b4d5b2546de0895c Mon Sep 17 00:00:00 2001 From: GroovieGermanikus Date: Tue, 27 Feb 2024 21:08:30 +0100 Subject: [PATCH] fix compile --- src/postgres.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/postgres.rs b/src/postgres.rs index 2ac6281..27bbe4c 100644 --- a/src/postgres.rs +++ b/src/postgres.rs @@ -190,21 +190,18 @@ impl PostgresSession { const TEMP_TABLESPACE: &str = "mango_tempspace"; let tablespace_exists = self.client - .query_opt("SELECT spcname FROM pg_tablespace WHERE spcname=$1", &[TEMP_TABLESPACE]) + .query_opt("SELECT spcname FROM pg_tablespace WHERE spcname=$1", &[&TEMP_TABLESPACE]) .await .unwrap().is_some(); if tablespace_exists { - info!("Tablespace {} already exists - use it for temp tables", TEMP_TABLESPACE); + info!("Tablespace {} exists - use it for temp tables", TEMP_TABLESPACE); self.client - .execute("SET temp_tablespaces=$1", &[TEMP_TABLESPACE]) + .execute("SET temp_tablespaces=$1", &[&TEMP_TABLESPACE]) .await .unwrap(); } } - - SELECT spcname FROM pg_tablespace; - pub async fn drop_temp_table(&self, table: String) -> anyhow::Result<()> { self.client .execute(format!("drop table if exists {};", table).as_str(), &[])