Skip to content

Commit 1dd13c9

Browse files
authored
Add missing unsafe on GUC hook registration (#2348)
As documented, these functions are unsafe because the caller must apply `pg_guard` to the arguments.
1 parent a6b26b8 commit 1dd13c9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pgrx/src/guc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ impl GucRegistry {
526526
/// Any hook function that might panic must be marked with `#[pg_guard]` to ensure proper
527527
/// conversion of Rust panics into PostgreSQL errors.
528528
///
529-
pub fn define_float_guc_with_hooks(
529+
pub unsafe fn define_float_guc_with_hooks(
530530
name: &'static CStr,
531531
short_description: &'static CStr,
532532
long_description: &'static CStr,

0 commit comments

Comments
 (0)