Add more explicit note that the parameters of MOVE are identical to FETCH.
[PostgreSQL.git] / doc / src / sgml / ref / alter_schema.sgml
blob2458d19974ba294f252b330a554a9b425ca130a7
1 <!--
2 $PostgreSQL$
3 PostgreSQL documentation
4 -->
6 <refentry id="SQL-ALTERSCHEMA">
7 <refmeta>
8 <refentrytitle id="SQL-ALTERSCHEMA-title">ALTER SCHEMA</refentrytitle>
9 <manvolnum>7</manvolnum>
10 <refmiscinfo>SQL - Language Statements</refmiscinfo>
11 </refmeta>
13 <refnamediv>
14 <refname>ALTER SCHEMA</refname>
15 <refpurpose>change the definition of a schema</refpurpose>
16 </refnamediv>
18 <indexterm zone="sql-alterschema">
19 <primary>ALTER SCHEMA</primary>
20 </indexterm>
22 <refsynopsisdiv>
23 <synopsis>
24 ALTER SCHEMA <replaceable>name</replaceable> RENAME TO <replaceable>newname</replaceable>
25 ALTER SCHEMA <replaceable>name</replaceable> OWNER TO <replaceable>newowner</replaceable>
26 </synopsis>
27 </refsynopsisdiv>
29 <refsect1>
30 <title>Description</title>
32 <para>
33 <command>ALTER SCHEMA</command> changes the definition of a schema.
34 </para>
36 <para>
37 You must own the schema to use <command>ALTER SCHEMA</>.
38 To rename a schema you must also have the
39 <literal>CREATE</literal> privilege for the database.
40 To alter the owner, you must also be a direct or
41 indirect member of the new owning role, and you must have the
42 <literal>CREATE</literal> privilege for the database.
43 (Note that superusers have all these privileges automatically.)
44 </para>
45 </refsect1>
47 <refsect1>
48 <title>Parameters</title>
50 <variablelist>
51 <varlistentry>
52 <term><replaceable>name</replaceable></term>
53 <listitem>
54 <para>
55 The name of an existing schema.
56 </para>
57 </listitem>
58 </varlistentry>
60 <varlistentry>
61 <term><replaceable>newname</replaceable></term>
62 <listitem>
63 <para>
64 The new name of the schema. The new name cannot
65 begin with <literal>pg_</literal>, as such names
66 are reserved for system schemas.
67 </para>
68 </listitem>
69 </varlistentry>
71 <varlistentry>
72 <term><replaceable class="parameter">newowner</replaceable></term>
73 <listitem>
74 <para>
75 The new owner of the schema.
76 </para>
77 </listitem>
78 </varlistentry>
79 </variablelist>
80 </refsect1>
82 <refsect1>
83 <title>Compatibility</title>
85 <para>
86 There is no <command>ALTER SCHEMA</command> statement in the SQL
87 standard.
88 </para>
89 </refsect1>
91 <refsect1>
92 <title>See Also</title>
94 <simplelist type="inline">
95 <member><xref linkend="sql-createschema" endterm="sql-createschema-title"></member>
96 <member><xref linkend="sql-dropschema" endterm="sql-dropschema-title"></member>
97 </simplelist>
98 </refsect1>
100 </refentry>