From d6c661ccb654749d685d5c4bd917a15028c6c4f1 Mon Sep 17 00:00:00 2001 From: Jere Vaara Date: Fri, 11 Oct 2024 09:20:46 +0300 Subject: [PATCH] add missing string to format --- compute_tools/src/spec.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/compute_tools/src/spec.rs b/compute_tools/src/spec.rs index 27bea806af..4a653c84e5 100644 --- a/compute_tools/src/spec.rs +++ b/compute_tools/src/spec.rs @@ -330,8 +330,10 @@ pub fn handle_roles(spec: &ComputeSpec, client: &mut Client) -> Result<()> { // If the role we're creating is intended for JWT login, we have // to make sure it can execute functions in the auth schema. if jwks_roles.contains(name.as_str()) { - let mut grant_query = - format!("GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA auth TO {}"); + let mut grant_query = format!( + "GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA auth TO {}", + name.pg_quote() + ); info!("running grant query for JWT role: '{}'", &grant_query); grant_query.push_str(&role.to_pg_options()); xact.execute(grant_query.as_str(), &[])?;