lc_monetary
A system parameter controlling currency unit formatting
lc_monetary
is a GUC|configuration parameter determining the currency formatting to be used by to_char()
and related functions.
lc_monetary
was added in PostgreSQL 7.3.
Default value
Dedfault value for lc_monetary
is: ''
(empty string).
Note that lc_monetary
is usually initialized by initdb using a value derivedfrom the server environment.
Change history
- PostgreSQL 7.3
- added (commit 867901db)
Examples
Basic usage example for lc_monetary
:
postgres=# SHOW lc_monetary ; lc_monetary ------------- ja_JP.UTF-8 (1 row) postgres=# SELECT to_char(1000, 'L9999'); to_char --------- ¥ 1000 (1 row) postgres=# SET lc_monetary = 'de_DE.utf-8'; SET postgres=# SELECT TO_CHAR(1000, 'L9999'); to_char --------- € 1000 (1 row)
References
- PostgreSQL documentation: lc_monetary
See also
lc_messages, lc_numeric, lc_time