{"Entry":{"collection":"guc","key":"lc_ctype","name":"lc_ctype","aliases":[],"metadata":{"baseline":false,"boot_human":"C","boot_val":"C","category":"Preset Options","category_zh":"","changed_in":["14"],"changes":[{"documentation_changed":false,"fields":{},"from":"7.4","status":"added","to":"8.0"},{"documentation_changed":true,"fields":{},"from":"8.0","status":"changed","to":"8.1"},{"documentation_changed":true,"fields":{},"from":"8.2","status":"changed","to":"8.3"},{"documentation_changed":true,"fields":{},"from":"8.3","status":"changed","to":"8.4"},{"documentation_changed":true,"fields":{},"from":"9.5","status":"changed","to":"9.6"},{"documentation_changed":true,"fields":{"category":{"from":"Client Connection Defaults / Locale and Formatting","to":"Preset Options"}},"from":"13","status":"changed","to":"14"},{"documentation_changed":false,"fields":{},"from":"15","status":"removed","to":"16"}],"content_hash":"8554ca701970e66a1762e226cf48d17c87f4d846d18a831efbfa3b0bf1ac1218","context":"internal","default_changed_in":[],"default_history":[{"from":"9.0","to":"15","value":"C"}],"editorial":{"advice":{"olap":"Record locale metadata with ETL outputs whose classification or normalization depends on it. Changing the locale requires deliberate migration, not a runtime setting.","oltp":"Not tunable. Migrate readers to pg_database and test case-folding, upper/lower behavior, and expression indexes before a locale/provider upgrade.","small":"Keep locale choice explicit at database creation and in rebuild automation. Do not assume the host default is stable across images or operating-system upgrades."},"mechanism":["Reported the current database’s character-classification and case-conversion locale through PG15. It was internal/read-only and PostgreSQL 16 removed it from pg_settings.","The locale is fixed when a database is created and can differ by database. It affects locale-aware character classes and case conversion, but is not a session switch and cannot be changed with ALTER SYSTEM.","On PG16 and later, migrate SHOW/current_setting consumers to pg_database locale-provider metadata and inspect pg_collation for object-level behavior. Application tests should cover case conversion and pattern/character-class assumptions."],"pitfalls":["Trying to configure a value that was always internal/read-only.","Assuming character classification is identical across databases or locale providers.","Changing locale libraries without testing expression indexes and case-conversion results.","Migrating only monitoring text while leaving applications dependent on SHOW lc_ctype."],"references":[{"title":"PostgreSQL 15: lc_ctype","url":"https://www.postgresql.org/docs/15/runtime-config-preset.html#GUC-LC-CTYPE"}],"related":["lc_collate","server_encoding","client_encoding","icu_validation_level","default_text_search_config","server_version_num"],"summary":"lc_ctype — Shows the character classification and case conversion locale. Observed in PG9.0–15; its last measured boot default is C in PG15, with internal context. It was removed in PG16."},"enumvals":[],"first_version":"8.0","group":"Preset Options","group_slug":"preset","imported_at":"2026-09-27T17:57:31.46842+08:00","intro_commit":{},"key":"lc_ctype","last_version":"15","max_val":"","min_val":"","name":"lc_ctype","position":207,"present_in":["8.0","8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6","10","11","12","13","14","15"],"short_desc":"Reports the locale that determines character classifications.","short_desc_zh":"","source_rev":"english-manuals:272f60850839c1fffadc6ca60e4f2e2bbf447158cf96b3fb688ed74878edd950","unit":"","vartype":"string"}},"Definition":{"Collection":"guc","Key":"lc_ctype","SourceDatabase":"center","Version":"15","SourceTable":"guc","SourceKey":"lc_ctype","SourceRevision":"english-manuals:272f60850839c1fffadc6ca60e4f2e2bbf447158cf96b3fb688ed74878edd950","Facts":{"boot_val":"C","category":"Preset Options","context":"internal","description":"Reports the locale that determines character classifications. See Section 24.1 for more information. This value is determined when a database is created. Ordinarily this will be the same as lc_collate, but for special applications it might be set differently.","doc":{"anchor":"GUC-LC-CTYPE","file":"runtime-config-preset.html","lang":"en","sha256":"62310ad6c753d113c914fb425a32c8ca41c3e7c98254f9d7f408c389b32b0890","slug":"15"},"documented":true,"enumvals":null,"extra_desc":null,"lang":"en","max_val":null,"metadata_version":"15","min_val":null,"name":"lc_ctype","short_desc":"Shows the character classification and case conversion locale.","source":"pg-settings-source-snapshot","unit":null,"vartype":"string"},"ManualEvidence":{"doc":{"anchor":"GUC-LC-CTYPE","file":"runtime-config-preset.html","lang":"en","sha256":"62310ad6c753d113c914fb425a32c8ca41c3e7c98254f9d7f408c389b32b0890","slug":"15"}},"MeasuredEvidence":{"metadata_version":"15"}},"Text":{"Collection":"guc","Key":"lc_ctype","SourceDatabase":"pgweb","Version":"15","Locale":"zh-Hans","Title":"lc_ctype","Summary":"","BodyHTML":"\u003cp\u003e报告决定字符分类的区域设置。更多信息参见\u003ca href=\"/docs/15/charset.html#LOCALE\" rel=\"nofollow\"\u003e第 24.1 节\u003c/a\u003e。此值在创建数据库时确定。通常它与\u003ccode\u003elc_collate\u003c/code\u003e相同，但特殊应用可能将它设置为不同的值。\u003c/p\u003e","SourceRevision":"2026-09-11@29c86d9","ContentHash":"d64da3f7d02f1213f26f6ed62cb36e09c6d03ef9e035b591207d55ee07682939","Payload":{"carried_from":"","carry_reason":"","doc_html":"\u003cp\u003e报告决定字符分类的区域设置。更多信息参见\u003ca href=\"/docs/15/charset.html#LOCALE\" title=\"24.1. 区域设置支持\"\u003e第 24.1 节\u003c/a\u003e。此值在创建数据库时确定。通常它与\u003ccode class=\"varname\"\u003elc_collate\u003c/code\u003e相同，但特殊应用可能将它设置为不同的值。\u003c/p\u003e","doc_same_as":""}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["10","11","12","13","14","15","8.0","8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
