3 PostgreSQL documentation
6 <refentry id=
"SQL-ALTERSCHEMA">
8 <refentrytitle id=
"SQL-ALTERSCHEMA-title">ALTER SCHEMA
</refentrytitle>
9 <refmiscinfo>SQL - Language Statements
</refmiscinfo>
13 <refname>ALTER SCHEMA
</refname>
14 <refpurpose>change the definition of a schema
</refpurpose>
17 <indexterm zone=
"sql-alterschema">
18 <primary>ALTER SCHEMA
</primary>
23 ALTER SCHEMA
<replaceable>name
</replaceable> RENAME TO
<replaceable>newname
</replaceable>
24 ALTER SCHEMA
<replaceable>name
</replaceable> OWNER TO
<replaceable>newowner
</replaceable>
29 <title>Description
</title>
32 <command>ALTER SCHEMA
</command> changes the definition of a schema.
36 You must own the schema to use
<command>ALTER SCHEMA<
/>.
37 To rename a schema you must also have the
38 <literal>CREATE
</literal> privilege for the database.
39 To alter the owner, you must also be a direct or
40 indirect member of the new owning role, and you must have the
41 <literal>CREATE
</literal> privilege for the database.
42 (Note that superusers have all these privileges automatically.)
47 <title>Parameters
</title>
51 <term><replaceable>name
</replaceable></term>
54 The name of an existing schema.
60 <term><replaceable>newname
</replaceable></term>
63 The new name of the schema. The new name cannot
64 begin with
<literal>pg_
</literal>, as such names
65 are reserved for system schemas.
71 <term><replaceable class=
"parameter">newowner
</replaceable></term>
74 The new owner of the schema.
82 <title>Compatibility
</title>
85 There is no
<command>ALTER SCHEMA
</command> statement in the SQL
91 <title>See Also
</title>
93 <simplelist type=
"inline">
94 <member><xref linkend=
"sql-createschema" endterm=
"sql-createschema-title"></member>
95 <member><xref linkend=
"sql-dropschema" endterm=
"sql-dropschema-title"></member>