{"Entry":{"collection":"guc","key":"lc_collate","name":"lc_collate","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":"d153eb3faca4b19c529a926919a22c32c5d6d079750c72b231d1eba56ab9bffd","context":"internal","default_changed_in":[],"default_history":[{"from":"9.0","to":"15","value":"C"}],"editorial":{"advice":{"olap":"Record per-database provider and locale beside analytical exports. A desired collation change requires a deliberate database/object migration and possible REINDEX, not a GUC edit.","oltp":"Not tunable. Replace SHOW/current_setting readers with a version-aware pg_database query, and regression-test indexed ordering and uniqueness when moving databases between locale providers or versions.","small":"Use the database-creation default only when it is intentional. Preserve locale metadata in inventory and backups so a rebuild does not silently choose different ordering rules."},"mechanism":["Reported the current database’s collation locale through PG15. It was an internal read-only value, not a configurable GUC, and PostgreSQL 16 removed it from pg_settings.","The collation locale is selected when a database is created and can differ between databases in one cluster. It affects ordering and comparison semantics; changing the server configuration cannot rewrite existing indexes or database locale metadata.","On PG16 and later, monitoring and applications should read the current database row in pg_database and its locale-provider-specific metadata, and use pg_collation for individual collation objects. Test collation-version changes separately from this removed reporter."],"pitfalls":["Trying to remove or set lc_collate in configuration even though it was always internal/read-only.","Assuming one cluster-wide value applies to every database.","Changing operating-system or ICU locale data without checking collation versions and rebuilding affected indexes.","Comparing text behavior across providers using only a locale name."],"references":[{"title":"PostgreSQL 15: lc_collate","url":"https://www.postgresql.org/docs/15/runtime-config-preset.html#GUC-LC-COLLATE"}],"related":["lc_ctype","server_encoding","client_encoding","icu_validation_level","default_text_search_config","server_version_num"],"summary":"lc_collate — Shows the collation order 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.465561+08:00","intro_commit":{},"key":"lc_collate","last_version":"15","max_val":"","min_val":"","name":"lc_collate","position":206,"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 in which sorting of textual data is done.","short_desc_zh":"","source_rev":"english-manuals:54132028a4057f62d499a06a4703427048ddacb1bb5ab966daacbe11f6e470ed","unit":"","vartype":"string"}},"Definition":{"Collection":"guc","Key":"lc_collate","SourceDatabase":"center","Version":"15","SourceTable":"guc","SourceKey":"lc_collate","SourceRevision":"english-manuals:54132028a4057f62d499a06a4703427048ddacb1bb5ab966daacbe11f6e470ed","Facts":{"boot_val":"C","category":"Preset Options","context":"internal","description":"Reports the locale in which sorting of textual data is done. See Section 24.1 for more information. This value is determined when a database is created.","doc":{"anchor":"GUC-LC-COLLATE","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_collate","short_desc":"Shows the collation order locale.","source":"pg-settings-source-snapshot","unit":null,"vartype":"string"},"ManualEvidence":{"doc":{"anchor":"GUC-LC-COLLATE","file":"runtime-config-preset.html","lang":"en","sha256":"62310ad6c753d113c914fb425a32c8ca41c3e7c98254f9d7f408c389b32b0890","slug":"15"}},"MeasuredEvidence":{"metadata_version":"15"}},"Text":{"Collection":"guc","Key":"lc_collate","SourceDatabase":"pgweb","Version":"15","Locale":"zh-Hans","Title":"lc_collate","Summary":"","BodyHTML":"\u003cp\u003e报告对文本数据进行排序所使用的区域设置。更多信息参见\u003ca href=\"/docs/15/charset.html#LOCALE\" rel=\"nofollow\"\u003e第 24.1 节\u003c/a\u003e。此值在创建数据库时确定。\u003c/p\u003e","SourceRevision":"2026-09-11@29c86d9","ContentHash":"989b140fba04a7efdf0bf9337e88f09bada42db2847d3753538d1dd988777b34","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。此值在创建数据库时确定。\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}
