Skip to content

reserve ivorysql prefix for gucs#1196

Merged
gaoxueyu merged 1 commit intoIvorySQL:masterfrom
yasir-hussain-shah:fix/ivorysql_prefix_configs
Mar 3, 2026
Merged

reserve ivorysql prefix for gucs#1196
gaoxueyu merged 1 commit intoIvorySQL:masterfrom
yasir-hussain-shah:fix/ivorysql_prefix_configs

Conversation

@yasir-hussain-shah
Copy link
Copy Markdown
Contributor

@yasir-hussain-shah yasir-hussain-shah commented Feb 26, 2026

Currently, the following statements execute without error, potentially causing confusion since all IvorySQL GUCs share the "ivorysql" prefix:

SET ivorysql.dummy_config TO 'dummy';
RESET ivorysql.dummy_config;

This PR reserves the "ivorysql" prefix, ensuring these statements now produce errors.

Summary by CodeRabbit

  • New Features

    • Reserved the "ivorysql" configuration prefix so parameters using that prefix are disallowed.
  • Tests

    • Added tests that verify proper error messages when attempting to set or reset parameters using the reserved "ivorysql" prefix.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Feb 26, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f350796 and 9985869.

📒 Files selected for processing (3)
  • contrib/ivorysql_ora/expected/ora_misc_functions.out
  • contrib/ivorysql_ora/sql/ora_misc_functions.sql
  • contrib/ivorysql_ora/src/ivorysql_ora.c
🚧 Files skipped from review as they are similar to previous changes (3)
  • contrib/ivorysql_ora/expected/ora_misc_functions.out
  • contrib/ivorysql_ora/src/ivorysql_ora.c
  • contrib/ivorysql_ora/sql/ora_misc_functions.sql

📝 Walkthrough

Walkthrough

Reserves the "ivorysql" GUC prefix in contrib/ivorysql_ora/src/ivorysql_ora.c by calling MarkGUCPrefixReserved("ivorysql") during _PG_init, and adds tests in contrib/ivorysql_ora/sql/ and expected output to validate error handling when attempting to set parameters under that reserved prefix.

Changes

Cohort / File(s) Summary
Test Cases / Expected Output
contrib/ivorysql_ora/sql/ora_misc_functions.sql, contrib/ivorysql_ora/expected/ora_misc_functions.out
Appended test steps that attempt to SET and RESET a parameter named ivorysql.dummy_config, asserting the error produced for a reserved GUC prefix.
Module Initialization
contrib/ivorysql_ora/src/ivorysql_ora.c
Added MarkGUCPrefixReserved("ivorysql") call in _PG_init to reserve the ivorysql GUC namespace during module initialization.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

feature

Suggested reviewers

  • bigplaice
  • jiaoshuntian

Poem

🐰 I hop in code to mark a name,
Ivorysql kept safe from any claim.
Tests will try and loudly shout,
"You cannot set what’s marked out!"
A tidy patch — a rabbit’s game.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: reserving the 'ivorysql' prefix for GUCs (Gucs/configuration parameters).
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@bigplaice
Copy link
Copy Markdown
Collaborator

We'll evaluate this PR to see if it is worth to be merged in, thanks!

@bigplaice
Copy link
Copy Markdown
Collaborator

I think this enhancement is good to IvorySQL, and will suggest to merge it.
Thanks for the contribution!

@yasir-hussain-shah yasir-hussain-shah force-pushed the fix/ivorysql_prefix_configs branch from f350796 to 9985869 Compare March 3, 2026 03:10
@yasir-hussain-shah
Copy link
Copy Markdown
Contributor Author

@gaoxueyu this is ready to be merged.

@gaoxueyu gaoxueyu merged commit ba9c6f3 into IvorySQL:master Mar 3, 2026
6 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.

4 participants