diff --git a/pgml-extension/src/bindings/venv.rs b/pgml-extension/src/bindings/venv.rs index e29872a94..68a0c0e40 100644 --- a/pgml-extension/src/bindings/venv.rs +++ b/pgml-extension/src/bindings/venv.rs @@ -7,6 +7,8 @@ use pyo3::prelude::*; use pyo3::types::PyTuple; use std::ffi::CStr; +static CONFIG_NAME: &'static str = "pgml.venv"; + static PY_MODULE: Lazy> = Lazy::new(|| { Python::with_gil(|py| -> Py { let src = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/bindings/venv.py")); @@ -28,8 +30,7 @@ pub fn activate_venv(venv: &str) -> bool { pub fn activate() -> bool { unsafe { - let config_name = "pgml.venv".to_string(); - let option = pgrx_pg_sys::GetConfigOption(config_name.as_pg_cstr(), true, false); + let option = pgrx_pg_sys::GetConfigOption(CONFIG_NAME.as_pg_cstr(), true, false); if option.is_null() { false } else { pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy