|
1 | 1 | <!--
|
2 |
| -$PostgreSQL: pgsql/doc/src/sgml/ref/alter_database.sgml,v 1.20 2007/09/03 18:46:29 tgl Exp $ |
| 2 | +$PostgreSQL: pgsql/doc/src/sgml/ref/alter_database.sgml,v 1.21 2008/11/07 18:25:06 tgl Exp $ |
3 | 3 | PostgreSQL documentation
|
4 | 4 | -->
|
5 | 5 |
|
@@ -30,6 +30,8 @@ ALTER DATABASE <replaceable class="PARAMETER">name</replaceable> RENAME TO <repl
|
30 | 30 |
|
31 | 31 | ALTER DATABASE <replaceable class="PARAMETER">name</replaceable> OWNER TO <replaceable>new_owner</replaceable>
|
32 | 32 |
|
| 33 | +ALTER DATABASE <replaceable class="PARAMETER">name</replaceable> SET TABLESPACE <replaceable class="PARAMETER">new_tablespace</replaceable> |
| 34 | + |
33 | 35 | ALTER DATABASE <replaceable class="PARAMETER">name</replaceable> SET <replaceable>configuration_parameter</replaceable> { TO | = } { <replaceable>value</replaceable> | DEFAULT }
|
34 | 36 | ALTER DATABASE <replaceable class="PARAMETER">name</replaceable> SET <replaceable>configuration_parameter</replaceable> FROM CURRENT
|
35 | 37 | ALTER DATABASE <replaceable class="PARAMETER">name</replaceable> RESET <replaceable>configuration_parameter</replaceable>
|
@@ -67,6 +69,15 @@ ALTER DATABASE <replaceable class="PARAMETER">name</replaceable> RESET ALL
|
67 | 69 | (Note that superusers have all these privileges automatically.)
|
68 | 70 | </para>
|
69 | 71 |
|
| 72 | + <para> |
| 73 | + The fourth form changes the default tablespace of the database. |
| 74 | + Only the database owner or a superuser can do this; you must also have |
| 75 | + create privilege for the new tablespace. |
| 76 | + This command physically moves any tables or indexes in the database's old |
| 77 | + default tablespace to the new tablespace. Note that tables and indexes |
| 78 | + in non-default tablespaces are not affected. |
| 79 | + </para> |
| 80 | + |
70 | 81 | <para>
|
71 | 82 | The remaining forms change the session default for a run-time
|
72 | 83 | configuration variable for a <productname>PostgreSQL</productname>
|
@@ -122,6 +133,15 @@ ALTER DATABASE <replaceable class="PARAMETER">name</replaceable> RESET ALL
|
122 | 133 | </listitem>
|
123 | 134 | </varlistentry>
|
124 | 135 |
|
| 136 | + <varlistentry> |
| 137 | + <term><replaceable class="parameter">new_tablespace</replaceable></term> |
| 138 | + <listitem> |
| 139 | + <para> |
| 140 | + The new default tablespace of the database. |
| 141 | + </para> |
| 142 | + </listitem> |
| 143 | + </varlistentry> |
| 144 | + |
125 | 145 | <varlistentry>
|
126 | 146 | <term><replaceable>configuration_parameter</replaceable></term>
|
127 | 147 | <term><replaceable>value</replaceable></term>
|
@@ -189,6 +209,7 @@ ALTER DATABASE test SET enable_indexscan TO off;
|
189 | 209 | <member><xref linkend="sql-createdatabase" endterm="sql-createdatabase-title"></member>
|
190 | 210 | <member><xref linkend="sql-dropdatabase" endterm="sql-dropdatabase-title"></member>
|
191 | 211 | <member><xref linkend="sql-set" endterm="sql-set-title"></member>
|
| 212 | + <member><xref linkend="sql-createtablespace" endterm="sql-createtablespace-title"></member> |
192 | 213 | </simplelist>
|
193 | 214 | </refsect1>
|
194 | 215 | </refentry>
|
0 commit comments