Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
246be304
Commit
246be304
authored
20 years ago
by
Bruce Momjian
Browse files
Options
Downloads
Patches
Plain Diff
Add mention of performance impact on LIKE of non-C locales.
parent
a2a5526e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
doc/src/sgml/charset.sgml
+15
-6
15 additions, 6 deletions
doc/src/sgml/charset.sgml
doc/src/sgml/ref/initdb.sgml
+14
-13
14 additions, 13 deletions
doc/src/sgml/ref/initdb.sgml
doc/src/sgml/runtime.sgml
+5
-4
5 additions, 4 deletions
doc/src/sgml/runtime.sgml
with
34 additions
and
23 deletions
doc/src/sgml/charset.sgml
+
15
−
6
View file @
246be304
<!-- $PostgreSQL: pgsql/doc/src/sgml/charset.sgml,v 2.4
7
200
4/12/27 22:30:10 tgl
Exp $ -->
<!-- $PostgreSQL: pgsql/doc/src/sgml/charset.sgml,v 2.4
8
200
5/01/04 00:05:44 momjian
Exp $ -->
<chapter id="charset">
<title>Localization</>
...
...
@@ -189,10 +189,10 @@ initdb --locale=sv_SE
</sect2>
<sect2>
<title>Be
nefits
</>
<title>Be
havior
</>
<para>
Locale support influences
in particular
the following features:
Locale support influences the following features:
<itemizedlist>
<listitem>
...
...
@@ -202,6 +202,13 @@ initdb --locale=sv_SE
</para>
</listitem>
<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
...
...
@@ -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>
...
...
This diff is collapsed.
Click to expand it.
doc/src/sgml/ref/initdb.sgml
+
14
−
13
View file @
246be304
<!--
$PostgreSQL: pgsql/doc/src/sgml/ref/initdb.sgml,v 1.3
2
200
4
/0
8
/0
1
0
6:19:18
momjian Exp $
$PostgreSQL: pgsql/doc/src/sgml/ref/initdb.sgml,v 1.3
3
200
5
/0
1
/0
4
0
0: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>
...
...
This diff is collapsed.
Click to expand it.
doc/src/sgml/runtime.sgml
+
5
−
4
View file @
246be304
<!--
$PostgreSQL: pgsql/doc/src/sgml/runtime.sgml,v 1.
299
200
4/12/26 23:06:56 tgl
Exp $
$PostgreSQL: pgsql/doc/src/sgml/runtime.sgml,v 1.
300
200
5/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>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment