{"Entry":{"collection":"guc","key":"lc_numeric","name":"lc_numeric","aliases":[],"metadata":{"baseline":true,"boot_human":"Not specified","boot_val":null,"category":"Client Connection Defaults / Locale and Formatting","category_zh":"","changed_in":["18"],"changes":[{"documentation_changed":true,"fields":{},"from":"7.4","status":"changed","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":"9.5","status":"changed","to":"9.6"},{"documentation_changed":true,"fields":{},"from":"13","status":"changed","to":"14"},{"documentation_changed":true,"fields":{},"from":"16","status":"changed","to":"17"},{"documentation_changed":false,"fields":{"extra_desc":{"from":null,"to":"An empty string means use the operating system setting."}},"from":"17","status":"changed","to":"18"}],"content_hash":"61431e6cb86fb075869ecf0aa02b5a48ae02cfdd929a00e95e0e8043cf529423","context":"","default_changed_in":[],"default_history":[{"from":"9.0","to":"19","value":"C"}],"editorial":{"advice":{"olap":"Pin lc_numeric for export, reporting, and reproducible analytical jobs; prefer explicit SQL formatting when a file or API has a durable schema.","oltp":"Treat lc_numeric as an application contract, not a performance knob. Standardize it per role or connection pool and keep wire formats explicit where clients parse text.","small":"Keep the upstream or locale-derived value unless a client requires another one. A smaller server gains no capacity from changing lc_numeric."},"mechanism":["lc_numeric sets the locale for formatting numbers. An empty string means use the operating system setting. It affects locale-sensitive numeric formatting such as decimal and grouping symbols, but ordinary SQL numeric literals retain SQL syntax.","lc_numeric is a USER-context setting. An authorized role can change it for a session, while ALTER ROLE or ALTER DATABASE can establish a default for future sessions.","It changes representation, parsing, or locale behavior at the client boundary rather than physical storage. Coordinate it with the other locale and formatting settings and with driver-native binary or typed protocols."],"pitfalls":["Changing lc_numeric in one session and assuming role defaults, database defaults, or other pooled sessions changed with it.","Assuming a presentation setting changes stored values or server-side type semantics.","Changing a role or database default without testing text-parsing clients, exports, and pooled sessions.","Changing lc_numeric globally without a rollback plan and a client or operational compatibility test."],"references":[{"title":"PostgreSQL 19 Beta 4: lc_numeric","url":"https://www.postgresql.org/docs/19/runtime-config-client.html#GUC-LC-NUMERIC"},{"title":"PostgreSQL 19 release notes","url":"https://www.postgresql.org/docs/19/release-19.html"}],"related":["client_encoding","lc_messages","lc_monetary","lc_time","default_text_search_config"],"summary":"lc_numeric is the PostgreSQL setting that defines the locale for formatting numbers."},"enumvals":[],"first_version":"7.4","group":"Client Connection Defaults","group_slug":"client","imported_at":"2026-09-27T17:57:31.480066+08:00","intro_commit":{},"key":"lc_numeric","last_version":"20","max_val":"","min_val":"","name":"lc_numeric","position":210,"present_in":["7.4","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","16","17","18","19","20"],"short_desc":"Sets the locale to use for formatting numbers, for example with the to_char family of functions.","short_desc_zh":"","source_rev":"english-manuals:09bcbc1e76b64fe50da029bac59068d966b00176e09338eb14bb1001ffc78527","unit":"","vartype":"string"}},"Definition":{"Collection":"guc","Key":"lc_numeric","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"lc_numeric","SourceRevision":"english-manuals:09bcbc1e76b64fe50da029bac59068d966b00176e09338eb14bb1001ffc78527","Facts":{"boot_val":"C","category":"Client Connection Defaults / Locale and Formatting","context":"user","description":"Sets the locale to use for formatting numbers, for example with the to_char family of functions. Acceptable values are system-dependent; see Section 23.1 for more information. If this variable is set to the empty string (which is the default) then the value is inherited from the execution environment of the server in a system-dependent way.","doc":{"anchor":"GUC-LC-NUMERIC","file":"runtime-config-client.html","lang":"en","sha256":"6be6cc70f29eca4695dc43b2b2b94c75b7e0eaaa2c00273d7a98488917a7edb7","slug":"18"},"documented":true,"enumvals":null,"extra_desc":"An empty string means use the operating system setting.","lang":"en","max_val":null,"metadata_version":"18","min_val":null,"name":"lc_numeric","short_desc":"Sets the locale for formatting numbers.","source":"pg-settings-source-snapshot","unit":null,"vartype":"string"},"ManualEvidence":{"doc":{"anchor":"GUC-LC-NUMERIC","file":"runtime-config-client.html","lang":"en","sha256":"6be6cc70f29eca4695dc43b2b2b94c75b7e0eaaa2c00273d7a98488917a7edb7","slug":"18"}},"MeasuredEvidence":{"metadata_version":"18"}},"Text":{"Collection":"guc","Key":"lc_numeric","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"lc_numeric","Summary":"","BodyHTML":"\u003cp\u003e设置用于格式化数字的区域设置，例如用\u003ccode\u003eto_char\u003c/code\u003e函数族。可接受的值是系统相关的；详见\u003ca href=\"/docs/18/locale.html\" rel=\"nofollow\"\u003e第 23.1 节\u003c/a\u003e。如果这个变量被设置为空字符串（默认），那么该值将以一种系统相关的方式从服务器的执行环境中继承。\u003c/p\u003e","SourceRevision":"2026-09-11@29c86d9","ContentHash":"15ccf4b804888b498bf2148325045c285f424d044e31ab8e0e13a267d68af6d2","Payload":{"carried_from":"","carry_reason":"","doc_html":"\u003cp\u003e设置用于格式化数字的区域设置，例如用\u003ccode class=\"function\"\u003eto_char\u003c/code\u003e函数族。可接受的值是系统相关的；详见\u003ca href=\"/docs/18/locale.html\" title=\"23.1. 区域设置支持\"\u003e第 23.1 节\u003c/a\u003e。如果这个变量被设置为空字符串（默认），那么该值将以一种系统相关的方式从服务器的执行环境中继承。\u003c/p\u003e","doc_same_as":""}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","7.4","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}
