The values that are chosen by initdb are actually only written into the configuration file nf to serve as defaults when the server is started. The other locale categories can be changed whenever desired by setting the server configuration parameters that have the same name as the locale categories (see Section 20.11.2 for details). (But you can alleviate this restriction using collations, as discussed in Section 24.2.) The default values for these categories are determined when initdb is run, and those values are used when new databases are created, unless specified otherwise in the CREATE DATABASE command. They affect the sort order of indexes, so they must be kept fixed, or indexes on text columns would become corrupt. LC_COLLATE and LC_CTYPE are these categories. You can use different settings for different databases, but once a database is created, you cannot change them for that database anymore. Some locale categories must have their values fixed when the database is created. If you want the system to behave as if it had no locale support, use the special locale name C, or equivalently POSIX. rules for formatting currency, use initdb -locale=fr_CA -lc-monetary=en_US. For instance, to set the locale to French Canadian, but use U.S. The category names translate into names of initdb options to override the locale choice for a specific category. To support that, a set of locale subcategories exist that control only certain aspects of the localization rules:Ĭharacter classification (What is a letter? Its upper-case equivalent?) Occasionally it is useful to mix rules from several locales, e.g., use English collation rules but Spanish messages. Windows uses more verbose locale names, such as German_Germany or Swedish_Sweden.1252, but the principles are the same. On most Unix systems, the command locale -a will provide a list of available locales. What locales are available on your system under what names depends on what was provided by the operating system vendor and what was installed. For example, fr_BE.UTF-8 represents the French language (fr) as spoken in Belgium (BE), with a UTF-8 character set encoding. If more than one character set can be used for a locale then the specifications can take the form language_deset. Other possibilities might include en_US (U.S. This example for Unix systems sets the locale to Swedish ( sv) as spoken in Sweden ( SE). If you want to use a different locale (or you are not sure which locale your system is set to), you can instruct initdb exactly which locale to use by specifying the -locale option. initdb will initialize the database cluster with the locale setting of its execution environment by default, so if your system is already set to use the locale that you want in your database cluster then there is nothing else you need to do. Locale support is automatically initialized when a database cluster is created using initdb.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |