{"Entry":{"collection":"guc","key":"lc_monetary","name":"lc_monetary","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":"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":"ad9f8ff3abcf471209b9e0ee646d24df236918dda9363cae9d7ee24413c18010","context":"","default_changed_in":[],"default_history":[{"from":"9.0","to":"19","value":"C"}],"editorial":{"advice":{"olap":"Pin lc_monetary for export, reporting, and reproducible analytical jobs; prefer explicit SQL formatting when a file or API has a durable schema.","oltp":"Treat lc_monetary 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_monetary."},"mechanism":["lc_monetary sets the locale for formatting monetary amounts. An empty string means use the operating system setting. It affects monetary formatting functions such as to_char, not the numeric value stored in a money or numeric column.","lc_monetary 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_monetary 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_monetary globally without a rollback plan and a client or operational compatibility test."],"references":[{"title":"PostgreSQL 19 Beta 4: lc_monetary","url":"https://www.postgresql.org/docs/19/runtime-config-client.html#GUC-LC-MONETARY"},{"title":"PostgreSQL 19 release notes","url":"https://www.postgresql.org/docs/19/release-19.html"}],"related":["client_encoding","lc_messages","lc_numeric","lc_time","default_text_search_config"],"summary":"lc_monetary is the PostgreSQL setting that defines the locale for formatting monetary amounts."},"enumvals":[],"first_version":"7.4","group":"Client Connection Defaults","group_slug":"client","imported_at":"2026-09-27T17:57:31.476253+08:00","intro_commit":{},"key":"lc_monetary","last_version":"20","max_val":"","min_val":"","name":"lc_monetary","position":209,"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 monetary amounts, for example with the to_char family of functions.","short_desc_zh":"","source_rev":"english-manuals:9fcc63166c48a346484c9b4d5e40a26fbf40e5d469ebd39890b4160c5e13e691","unit":"","vartype":"string"}},"Definition":{"Collection":"guc","Key":"lc_monetary","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"lc_monetary","SourceRevision":"english-manuals:9fcc63166c48a346484c9b4d5e40a26fbf40e5d469ebd39890b4160c5e13e691","Facts":{"boot_val":"C","category":"Client Connection Defaults / Locale and Formatting","context":"user","description":"Sets the locale to use for formatting monetary amounts, 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-MONETARY","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_monetary","short_desc":"Sets the locale for formatting monetary amounts.","source":"pg-settings-source-snapshot","unit":null,"vartype":"string"},"ManualEvidence":{"doc":{"anchor":"GUC-LC-MONETARY","file":"runtime-config-client.html","lang":"en","sha256":"6be6cc70f29eca4695dc43b2b2b94c75b7e0eaaa2c00273d7a98488917a7edb7","slug":"18"}},"MeasuredEvidence":{"metadata_version":"18"}},"Text":{"Collection":"guc","Key":"lc_monetary","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"lc_monetary","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":"2beb7a3c336a05e2309462374771ae13328465a818c42c0eaf136626ff22a461","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}
