]> granicus.if.org Git - postgresql/blob - doc/src/sgml/ref/alter_collation.sgml
Create a "sort support" interface API for faster sorting.
[postgresql] / doc / src / sgml / ref / alter_collation.sgml
1 <!--
2 doc/src/sgml/ref/alter_collation.sgml
3 PostgreSQL documentation
4 -->
5
6 <refentry id="SQL-ALTERCOLLATION">
7  <refmeta>
8   <refentrytitle>ALTER COLLATION</refentrytitle>
9   <manvolnum>7</manvolnum>
10   <refmiscinfo>SQL - Language Statements</refmiscinfo>
11  </refmeta>
12
13  <refnamediv>
14   <refname>ALTER COLLATION</refname>
15   <refpurpose>change the definition of a collation</refpurpose>
16  </refnamediv>
17
18  <indexterm zone="sql-altercollation">
19   <primary>ALTER COLLATION</primary>
20  </indexterm>
21
22  <refsynopsisdiv>
23 <synopsis>
24 ALTER COLLATION <replaceable>name</replaceable> RENAME TO <replaceable>new_name</replaceable>
25 ALTER COLLATION <replaceable>name</replaceable> OWNER TO <replaceable>new_owner</replaceable>
26 ALTER COLLATION <replaceable>name</replaceable> SET SCHEMA <replaceable>new_schema</replaceable>
27 </synopsis>
28  </refsynopsisdiv>
29
30  <refsect1>
31   <title>Description</title>
32
33   <para>
34    <command>ALTER COLLATION</command> changes the definition of a
35    collation.
36   </para>
37
38   <para>
39    You must own the collation to use <command>ALTER COLLATION</>.
40    To alter the owner, you must also be a direct or indirect member of the new
41    owning role, and that role must have <literal>CREATE</literal> privilege on
42    the collation's schema.  (These restrictions enforce that altering the
43    owner doesn't do anything you couldn't do by dropping and recreating the
44    collation. However, a superuser can alter ownership of any collation
45    anyway.)
46   </para>
47  </refsect1>
48
49  <refsect1>
50   <title>Parameters</title>
51
52   <variablelist>
53    <varlistentry>
54     <term><replaceable class="parameter">name</replaceable></term>
55     <listitem>
56      <para>
57       The name (optionally schema-qualified) of an existing collation.
58      </para>
59     </listitem>
60    </varlistentry>
61
62    <varlistentry>
63     <term><replaceable class="parameter">new_name</replaceable></term>
64     <listitem>
65      <para>
66       The new name of the collation.
67      </para>
68     </listitem>
69    </varlistentry>
70
71    <varlistentry>
72     <term><replaceable class="parameter">new_owner</replaceable></term>
73     <listitem>
74      <para>
75       The new owner of the collation.
76      </para>
77     </listitem>
78    </varlistentry>
79
80    <varlistentry>
81     <term><replaceable class="parameter">new_schema</replaceable></term>
82     <listitem>
83      <para>
84       The new schema for the collation.
85      </para>
86     </listitem>
87    </varlistentry>
88   </variablelist>
89  </refsect1>
90
91  <refsect1>
92   <title>Examples</title>
93
94   <para>
95    To rename the collation <literal>de_DE</literal> to
96    <literal>german</literal>:
97 <programlisting>
98 ALTER COLLATION "de_DE" RENAME TO german;
99 </programlisting>
100   </para>
101
102   <para>
103    To change the owner of the collation <literal>en_US</literal> to
104    <literal>joe</literal>:
105 <programlisting>
106 ALTER COLLATION "en_US" OWNER TO joe;
107 </programlisting></para>
108  </refsect1>
109
110  <refsect1>
111   <title>Compatibility</title>
112
113   <para>
114    There is no <command>ALTER COLLATION</command> statement in the SQL
115    standard.
116   </para>
117  </refsect1>
118
119  <refsect1>
120   <title>See Also</title>
121
122   <simplelist type="inline">
123    <member><xref linkend="sql-createcollation"></member>
124    <member><xref linkend="sql-dropcollation"></member>
125   </simplelist>
126  </refsect1>
127 </refentry>