summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian2005-01-04 00:05:45 +0000
committerBruce Momjian2005-01-04 00:05:45 +0000
commit246be304a50db42fae2f7c70329049442211b324 (patch)
treedcd834c4028f2ab858963606218404ea91f65e32
parenta2a5526ecb3d7290baa6785d4fbbde8850efa6d0 (diff)
Add mention of performance impact on LIKE of non-C locales.
-rw-r--r--doc/src/sgml/charset.sgml21
-rw-r--r--doc/src/sgml/ref/initdb.sgml27
-rw-r--r--doc/src/sgml/runtime.sgml9
3 files changed, 34 insertions, 23 deletions
diff --git a/doc/src/sgml/charset.sgml b/doc/src/sgml/charset.sgml
index fb74988f1a0..0b9aa697f32 100644
--- a/doc/src/sgml/charset.sgml
+++ b/doc/src/sgml/charset.sgml
@@ -1,4 +1,4 @@
-<!-- $PostgreSQL: pgsql/doc/src/sgml/charset.sgml,v 2.47 2004/12/27 22:30:10 tgl Exp $ -->
+<!-- $PostgreSQL: pgsql/doc/src/sgml/charset.sgml,v 2.48 2005/01/04 00:05:44 momjian Exp $ -->
<chapter id="charset">
<title>Localization</>
@@ -189,10 +189,10 @@ initdb --locale=sv_SE
</sect2>
<sect2>
- <title>Benefits</>
+ <title>Behavior</>
<para>
- Locale support influences in particular the following features:
+ Locale support influences the following features:
<itemizedlist>
<listitem>
@@ -204,6 +204,13 @@ initdb --locale=sv_SE
<listitem>
<para>
+ The ability to use indexes with <literal>LIKE</> clauses
+ <indexterm><primary>LIKE</><secondary>and locales</></indexterm>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
The <function>to_char</> family of functions
</para>
</listitem>
@@ -211,9 +218,11 @@ initdb --locale=sv_SE
</para>
<para>
- The only severe drawback of using the locale support in
- <productname>PostgreSQL</> is its speed. So use locales only if
- you actually need them.
+ The drawback of using locales other than <literal>C</> or
+ <literal>POSIX</> in <productname>PostgreSQL</> is its performance
+ impact. It slows character handling and prevents ordinary indexes
+ from being used by <literal>LIKE</>. For this reason use locales
+ only if you actually need them.
</para>
</sect2>
diff --git a/doc/src/sgml/ref/initdb.sgml b/doc/src/sgml/ref/initdb.sgml
index 10d65030e4f..ab6ceb216e1 100644
--- a/doc/src/sgml/ref/initdb.sgml
+++ b/doc/src/sgml/ref/initdb.sgml
@@ -1,5 +1,5 @@
<!--
-$PostgreSQL: pgsql/doc/src/sgml/ref/initdb.sgml,v 1.32 2004/08/01 06:19:18 momjian Exp $
+$PostgreSQL: pgsql/doc/src/sgml/ref/initdb.sgml,v 1.33 2005/01/04 00:05:45 momjian Exp $
PostgreSQL documentation
-->
@@ -54,21 +54,22 @@ PostgreSQL documentation
</para>
<para>
- <command>initdb</command> 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 <command>initdb</command>.
- Other locale categories can be changed later when the server is
- started. <command>initdb</command> will write those locale
- settings into the <filename>postgresql.conf</filename>
- configuration file so they are the default, but they can be changed
- by editing that file. To set the locale that
- <command>initdb</command> uses, see the description of the
- <option>--locale</option> option. The character set encoding can
+ <command>initdb</command> 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 <literal>C</> or <literal>POSIX</>.
+ Therefore it is important to make the right choice when running
+ <command>initdb</command>. Other locale categories can be changed
+ later when the server is started. <command>initdb</command> will
+ write those locale settings into the
+ <filename>postgresql.conf</filename> configuration file so they are
+ the default, but they can be changed by editing that file. To set the
+ locale that <command>initdb</command> uses, see the description of
+ the <option>--locale</option> option. The character set encoding can
be set separately for each database as it is created.
<command>initdb</command> determines the encoding for the
<literal>template1</literal> 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>--encoding</option> option.
</para>
diff --git a/doc/src/sgml/runtime.sgml b/doc/src/sgml/runtime.sgml
index fad715d005d..eaf050a7bf1 100644
--- a/doc/src/sgml/runtime.sgml
+++ b/doc/src/sgml/runtime.sgml
@@ -1,5 +1,5 @@
<!--
-$PostgreSQL: pgsql/doc/src/sgml/runtime.sgml,v 1.299 2004/12/26 23:06:56 tgl Exp $
+$PostgreSQL: pgsql/doc/src/sgml/runtime.sgml,v 1.300 2005/01/04 00:05:44 momjian Exp $
-->
<Chapter Id="runtime">
@@ -144,9 +144,10 @@ postgres$ <userinput>initdb -D /usr/local/pgsql/data</userinput>
that can be found in <xref linkend="locale">. The sort order used
within a particular database cluster is set by
<command>initdb</command> and cannot be changed later, short of
- dumping all data, rerunning <command>initdb</command>, and
- reloading the data. So it's important to make this choice correctly
- the first time.
+ dumping all data, rerunning <command>initdb</command>, and reloading
+ the data. There is also a performance impact for using locales
+ other than <literal>C</> or <literal>POSIX</>. Therefore, it is
+ important to make this choice correctly the first time.
</para>
</sect1>