-
+
Localization>
-
Benefits>
+
Behavior>
- Locale support influences in particular the following features:
+ Locale support influences the following features:
+
+ The ability to use indexes with LIKE> clauses
+
+
+
The to_char> family of functions
- The only severe drawback of using the locale support in
-
PostgreSQL> is its speed. So use locales only if
- you actually need them.
+ The drawback of using locales other than C> or
+
POSIX> in PostgreSQL> is its performance
+ impact. It slows character handling and prevents ordinary indexes
+ from being used by LIKE>. For this reason use locales
+ only if you actually need them.
- initdb initializes the database cluster's
- default locale and character set encoding. Some locale categories
- are fixed for the lifetime of the cluster, so it is important to
- make the right choice when running initdb.
- Other locale categories can be changed later when the server is
- started. initdb will write those locale
- settings into the postgresql.conf
- configuration file so they are the default, but they can be changed
- by editing that file. To set the locale that
- initdb uses, see the description of the
- option. The character set encoding can
+ initdb initializes the database cluster's default
+ locale and character set encoding. Some locale categories are fixed
+ for the lifetime of the cluster. There is also a performance impact
+ in using locales other than C> or POSIX>.
+ Therefore it is important to make the right choice when running
+ initdb. Other locale categories can be changed
+ later when the server is started. initdb will
+ write those locale settings into the
+ postgresql.conf configuration file so they are
+ the default, but they can be changed by editing that file. To set the
+ locale that initdb uses, see the description of
+ the option. The character set encoding can
be set separately for each database as it is created.
initdb determines the encoding for the
template1 database, which will serve as the
- default for all other databases. To alter the default encoding use
+ default for all other databases. To alter the default encoding use
the option.
that can be found in . The sort order used
within a particular database cluster is set by
initdb and cannot be changed later, short of
- dumping all data, rerunning initdb, and
- reloading the data. So it's important to make this choice correctly
- the first time.
+ dumping all data, rerunning initdb, and reloading
+ the data. There is also a performance impact for using locales
+ other than C> or POSIX>. Therefore, it is
+ important to make this choice correctly the first time.