Skip to content

change identifier_case_switch default value#950

Closed
yuanyl630 wants to merge 2 commits intoIvorySQL:masterfrom
yuanyl630:master
Closed

change identifier_case_switch default value#950
yuanyl630 wants to merge 2 commits intoIvorySQL:masterfrom
yuanyl630:master

Conversation

@yuanyl630
Copy link
Copy Markdown
Collaborator

@yuanyl630 yuanyl630 commented Nov 13, 2025

Summary by CodeRabbit

  • Configuration Changes

    • Default identifier case handling changed from INTERCHANGE to NORMAL mode.
    • Sample configuration updated to reflect the new default.
  • Documentation / UX

    • Command-line/initdb help and usage text updated to show the new default case-conversion mode.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Nov 13, 2025

Walkthrough

Change default behavior of the identifier_case_switch GUC from INTERCHANGE to NORMAL across runtime initialization, sample config, and initdb defaults and help text.

Changes

Cohort / File(s) Summary
GUC runtime & enum
src/backend/utils/misc/ivy_guc.c
Set runtime variable identifier_case_switch initial value from INTERCHANGENORMAL; update Ivy_ConfigureNamesEnum default entry for ivorysql.identifier_case_switch to NORMAL.
Sample config
src/backend/utils/misc/ivorysql.conf.sample
Update sample configuration default for ivorysql.identifier_case_switch from interchangenormal.
initdb defaults & help
src/bin/initdb/initdb.c
Change static default strings/values: switchmode → "normal", caseswitchmode enum → NORMAL; update usage/help text to show default normal instead of interchange.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Small, consistent value changes across three files.
  • Pay attention to:
    • Correct enum/value mapping and compilation in ivy_guc.c.
    • Consistency between sample config, initdb text, and runtime default.

Possibly related PRs

Suggested reviewers

  • gaoxueyu
  • jiaoshuntian

Poem

🐰 A tiny toggle hops to normal light,
From INTERCHANGE it finds the right,
Defaults aligned, the field is neat,
Identifiers march in orderly feet. 🥕

Pre-merge checks and finishing touches

✅ 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 clearly and accurately describes the main change: modifying the default value of the identifier_case_switch parameter from INTERCHANGE to NORMAL across multiple configuration files and source code.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b451264 and f8247a3.

📒 Files selected for processing (2)
  • src/backend/utils/misc/ivorysql.conf.sample (1 hunks)
  • src/bin/initdb/initdb.c (2 hunks)
✅ Files skipped from review due to trivial changes (1)
  • src/bin/initdb/initdb.c
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-10-24T08:19:29.453Z
Learnt from: OreoYang
Repo: IvorySQL/IvorySQL PR: 931
File: src/backend/oracle_parser/ora_gram.y:0-0
Timestamp: 2025-10-24T08:19:29.453Z
Learning: In IvorySQL’s parser (src/backend/oracle_parser/ora_gram.y and related headers), downcase_identifier has the 4-argument signature:
extern char *downcase_identifier(const char *ident, int len, bool warn, bool truncate);

Applied to files:

  • src/backend/utils/misc/ivorysql.conf.sample
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: build (ubuntu-latest)
  • GitHub Check: oracle_regression (ubuntu-latest)
  • GitHub Check: meson_build (ubuntu-latest)
  • GitHub Check: oracle_pg_regression (ubuntu-latest)
  • GitHub Check: pg_regression (ubuntu-latest)
  • GitHub Check: contrib_regression
🔇 Additional comments (1)
src/backend/utils/misc/ivorysql.conf.sample (1)

15-15: LGTM! Default value updated correctly.

The default value for identifier_case_switch has been correctly updated to normal, which aligns with the PR objective and matches the valid range documented in the 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.

@yuanyl630 yuanyl630 closed this Nov 13, 2025
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.

1 participant