1
1
<!--
2
- $PostgreSQL: pgsql/doc/src/sgml/ref/alter_index.sgml,v 1.5 2005/03/14 00: 19:36 neilc Exp $
2
+ $PostgreSQL: pgsql/doc/src/sgml/ref/alter_index.sgml,v 1.6 2005/08/22 19:39:52 tgl Exp $
3
3
PostgreSQL documentation
4
4
-->
5
5
@@ -20,13 +20,8 @@ PostgreSQL documentation
20
20
21
21
<refsynopsisdiv>
22
22
<synopsis>
23
- ALTER INDEX <replaceable class="PARAMETER">name</replaceable> <replaceable class="PARAMETER">action</replaceable> [, ... ]
24
23
ALTER INDEX <replaceable class="PARAMETER">name</replaceable> RENAME TO <replaceable class="PARAMETER">new_name</replaceable>
25
-
26
- where <replaceable class="PARAMETER">action</replaceable> is one of:
27
-
28
- OWNER TO <replaceable class="PARAMETER">new_owner</replaceable>
29
- SET TABLESPACE <replaceable class="PARAMETER">indexspace_name</replaceable>
24
+ ALTER INDEX <replaceable class="PARAMETER">name</replaceable> SET TABLESPACE <replaceable class="PARAMETER">tablespace_name</replaceable>
30
25
</synopsis>
31
26
</refsynopsisdiv>
32
27
@@ -40,11 +35,11 @@ where <replaceable class="PARAMETER">action</replaceable> is one of:
40
35
<variablelist>
41
36
42
37
<varlistentry>
43
- <term><literal>OWNER </literal></term>
38
+ <term><literal>RENAME </literal></term>
44
39
<listitem>
45
40
<para>
46
- This form changes the owner of the index to the
47
- specified user. This can only be done by a superuser .
41
+ The <literal>RENAME</literal> form changes the name of the index.
42
+ There is no effect on the stored data .
48
43
</para>
49
44
</listitem>
50
45
</varlistentry>
@@ -61,24 +56,9 @@ where <replaceable class="PARAMETER">action</replaceable> is one of:
61
56
</listitem>
62
57
</varlistentry>
63
58
64
- <varlistentry>
65
- <term><literal>RENAME</literal></term>
66
- <listitem>
67
- <para>
68
- The <literal>RENAME</literal> form changes the name of the index.
69
- There is no effect on the stored data.
70
- </para>
71
- </listitem>
72
- </varlistentry>
73
-
74
59
</variablelist>
75
60
</para>
76
61
77
- <para>
78
- All the actions except <literal>RENAME</literal> can be combined into
79
- a list of multiple alterations to apply in parallel.
80
- </para>
81
-
82
62
</refsect1>
83
63
84
64
<refsect1>
@@ -90,28 +70,17 @@ where <replaceable class="PARAMETER">action</replaceable> is one of:
90
70
<term><replaceable class="PARAMETER">name</replaceable></term>
91
71
<listitem>
92
72
<para>
93
- The name (possibly schema-qualified) of an existing index to
94
- alter.
73
+ The name (possibly schema-qualified) of an existing index to
74
+ alter.
95
75
</para>
96
76
</listitem>
97
77
</varlistentry>
98
78
99
-
100
79
<varlistentry>
101
80
<term><replaceable class="PARAMETER">new_name</replaceable></term>
102
81
<listitem>
103
82
<para>
104
- New name for the index.
105
- </para>
106
- </listitem>
107
- </varlistentry>
108
-
109
-
110
- <varlistentry>
111
- <term><replaceable class="PARAMETER">new_owner</replaceable></term>
112
- <listitem>
113
- <para>
114
- The user name of the new owner of the index.
83
+ New name for the index.
115
84
</para>
116
85
</listitem>
117
86
</varlistentry>
@@ -120,7 +89,7 @@ where <replaceable class="PARAMETER">action</replaceable> is one of:
120
89
<term><replaceable class="PARAMETER">tablespace_name</replaceable></term>
121
90
<listitem>
122
91
<para>
123
- The tablespace name to which the index will be moved.
92
+ The tablespace to which the index will be moved.
124
93
</para>
125
94
</listitem>
126
95
</varlistentry>
@@ -138,6 +107,13 @@ where <replaceable class="PARAMETER">action</replaceable> is one of:
138
107
of <command>ALTER TABLE</> that apply to indexes.
139
108
</para>
140
109
110
+ <para>
111
+ There was formerly an <command>ALTER INDEX OWNER</> variant, but
112
+ this is now ignored (with a warning). An index cannot have an owner
113
+ different from its table's owner. Changing the table's owner
114
+ automatically changes the index as well.
115
+ </para>
116
+
141
117
<para>
142
118
Changing any part of a system catalog index is not permitted.
143
119
</para>
@@ -153,7 +129,7 @@ ALTER INDEX distributors RENAME TO suppliers;
153
129
</para>
154
130
155
131
<para>
156
- To move a index to a different tablespace:
132
+ To move an index to a different tablespace:
157
133
<programlisting>
158
134
ALTER INDEX distributors SET TABLESPACE fasttablespace;
159
135
</programlisting>
0 commit comments