1
0
mirror of https://github.com/postgres/postgres.git synced 2025-12-22 17:42:17 +03:00

Make a code-cleanup pass over the collations patch.

This patch is almost entirely cosmetic --- mostly cleaning up a lot of
neglected comments, and fixing code layout problems in places where the
patch made lines too long and then pgindent did weird things with that.
I did find a bug-of-omission in equalTupleDescs().
This commit is contained in:
Tom Lane
2011-04-22 17:43:18 -04:00
parent 0cfdc1c657
commit 9e9b9ac7d1
24 changed files with 179 additions and 118 deletions

View File

@@ -108,8 +108,8 @@ CREATE COLLATION <replaceable>name</replaceable> FROM <replaceable>existing_coll
<listitem>
<para>
The name of an existing collation to copy. The new collation
will have the same properties as the existing one, but they
will become independent objects.
will have the same properties as the existing one, but it
will be an independent object.
</para>
</listitem>
</varlistentry>
@@ -134,7 +134,8 @@ CREATE COLLATION <replaceable>name</replaceable> FROM <replaceable>existing_coll
<title>Examples</title>
<para>
To create a collation from the locale <literal>fr_FR.utf8</literal>
To create a collation from the operating system locale
<literal>fr_FR.utf8</literal>
(assuming the current database encoding is <literal>UTF8</literal>):
<programlisting>
CREATE COLLATION french (LOCALE = 'fr_FR.utf8');

View File

@@ -90,7 +90,7 @@ CREATE DOMAIN <replaceable class="parameter">name</replaceable> [ AS ] <replacea
<para>
An optional collation for the domain. If no collation is
specified, the underlying data type's default collation is used.
The underlying type must be collatable when <literal>COLLATE</>
The underlying type must be collatable if <literal>COLLATE</>
is specified.
</para>
</listitem>

View File

@@ -188,9 +188,8 @@ CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ <replaceable class="parameter">name</
The name of the collation to use for the index. By default,
the index uses the collation declared for the column to be
indexed or the result collation of the expression to be
indexed. Indexes with nondefault collations are
available for use by queries that involve expressions using
nondefault collations.
indexed. Indexes with non-default collations can be useful for
queries that involve expressions using non-default collations.
</para>
</listitem>
</varlistentry>
@@ -537,6 +536,13 @@ CREATE INDEX ON films ((lower(title)));
will choose a name, typically <literal>films_lower_idx</>.)
</para>
<para>
To create an index with non-default collation:
<programlisting>
CREATE INDEX title_idx_german ON films (title COLLATE "de_DE");
</programlisting>
</para>
<para>
To create an index with non-default sort ordering of nulls:
<programlisting>

View File

@@ -355,10 +355,10 @@ CREATE TYPE <replaceable class="parameter">name</replaceable>
</para>
<para>
If the optional
If the optional boolean
parameter <replaceable class="parameter">collatable</replaceable>
is true, column definitions and expressions of the type may carry
collation information and allow the use of
collation information through use of
the <literal>COLLATE</literal> clause. It is up to the
implementations of the functions operating on the type to actually
make use of the collation information; this does not happen