Skip to content

Fix incorrect mutability in GUC assign hook macro#2356

Merged
eeeebbbbrrrr merged 1 commit into
pgcentralfoundation:developfrom
cbandy:fix-guc-hook
Jul 15, 2026
Merged

Fix incorrect mutability in GUC assign hook macro#2356
eeeebbbbrrrr merged 1 commit into
pgcentralfoundation:developfrom
cbandy:fix-guc-hook

Conversation

@cbandy

@cbandy cbandy commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

The assign hook for strings requires a const char * rather than char *. This adds RawConst and from_raw_const to the GucValue trait for the pg_guc_hook(assign) macro to use.

Tests for the pg_guc_hook macro are now generated in pgrx-unit-tests and include all GucValue types.

Comment thread pgrx-unit-tests/src/tests/guc_tests.rs Outdated
The assign hook for strings requires a `const char *` rather than `char *`.
This adds `RawConst` and `from_raw_const` to the `GucValue` trait for
the `pg_guc_hook(assign)` macro to use.

Tests for the `pg_guc_hook` macro are now generated in `pgrx-unit-tests`
and include all `GucValue` types.
@eeeebbbbrrrr

Copy link
Copy Markdown
Contributor

once again, thanks @cbandy!

@eeeebbbbrrrr
eeeebbbbrrrr merged commit e6141fb into pgcentralfoundation:develop Jul 15, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants