From 4f4146266ee7b1d1607a2b53c0425a57f288b787 Mon Sep 17 00:00:00 2001 From: Chris Bandy Date: Sat, 4 Jul 2026 03:19:18 +0000 Subject: [PATCH] Add missing unsafe on GUC hook registration As documented, these functions are unsafe because the caller must apply `pg_guard` to the arguments. --- pgrx/src/guc.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pgrx/src/guc.rs b/pgrx/src/guc.rs index dd25b43a3..99c1f4e8d 100644 --- a/pgrx/src/guc.rs +++ b/pgrx/src/guc.rs @@ -526,7 +526,7 @@ impl GucRegistry { /// Any hook function that might panic must be marked with `#[pg_guard]` to ensure proper /// conversion of Rust panics into PostgreSQL errors. /// - pub fn define_float_guc_with_hooks( + pub unsafe fn define_float_guc_with_hooks( name: &'static CStr, short_description: &'static CStr, long_description: &'static CStr,