3 PostgreSQL documentation
6 <refentry id=
"SQL-ALTERSCHEMA">
8 <refentrytitle id=
"SQL-ALTERSCHEMA-title">ALTER SCHEMA
</refentrytitle>
9 <manvolnum>7</manvolnum>
10 <refmiscinfo>SQL - Language Statements
</refmiscinfo>
14 <refname>ALTER SCHEMA
</refname>
15 <refpurpose>change the definition of a schema
</refpurpose>
18 <indexterm zone=
"sql-alterschema">
19 <primary>ALTER SCHEMA
</primary>
24 ALTER SCHEMA
<replaceable>name
</replaceable> RENAME TO
<replaceable>newname
</replaceable>
25 ALTER SCHEMA
<replaceable>name
</replaceable> OWNER TO
<replaceable>newowner
</replaceable>
30 <title>Description
</title>
33 <command>ALTER SCHEMA
</command> changes the definition of a schema.
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.)
48 <title>Parameters
</title>
52 <term><replaceable>name
</replaceable></term>
55 The name of an existing schema.
61 <term><replaceable>newname
</replaceable></term>
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.
72 <term><replaceable class=
"parameter">newowner
</replaceable></term>
75 The new owner of the schema.
83 <title>Compatibility
</title>
86 There is no
<command>ALTER SCHEMA
</command> statement in the SQL
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>