Make LC_COLLATE and LC_CTYPE database-level settings. Collation and
[PostgreSQL.git] / doc / src / sgml / ref / alter_schema.sgml
blob5b18472bdce6d34c72241efa5edcec3e38105f58
1 <!--
2 $PostgreSQL$
3 PostgreSQL documentation
4 -->
6 <refentry id="SQL-ALTERSCHEMA">
7 <refmeta>
8 <refentrytitle id="SQL-ALTERSCHEMA-title">ALTER SCHEMA</refentrytitle>
9 <refmiscinfo>SQL - Language Statements</refmiscinfo>
10 </refmeta>
12 <refnamediv>
13 <refname>ALTER SCHEMA</refname>
14 <refpurpose>change the definition of a schema</refpurpose>
15 </refnamediv>
17 <indexterm zone="sql-alterschema">
18 <primary>ALTER SCHEMA</primary>
19 </indexterm>
21 <refsynopsisdiv>
22 <synopsis>
23 ALTER SCHEMA <replaceable>name</replaceable> RENAME TO <replaceable>newname</replaceable>
24 ALTER SCHEMA <replaceable>name</replaceable> OWNER TO <replaceable>newowner</replaceable>
25 </synopsis>
26 </refsynopsisdiv>
28 <refsect1>
29 <title>Description</title>
31 <para>
32 <command>ALTER SCHEMA</command> changes the definition of a schema.
33 </para>
35 <para>
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.)
43 </para>
44 </refsect1>
46 <refsect1>
47 <title>Parameters</title>
49 <variablelist>
50 <varlistentry>
51 <term><replaceable>name</replaceable></term>
52 <listitem>
53 <para>
54 The name of an existing schema.
55 </para>
56 </listitem>
57 </varlistentry>
59 <varlistentry>
60 <term><replaceable>newname</replaceable></term>
61 <listitem>
62 <para>
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.
66 </para>
67 </listitem>
68 </varlistentry>
70 <varlistentry>
71 <term><replaceable class="parameter">newowner</replaceable></term>
72 <listitem>
73 <para>
74 The new owner of the schema.
75 </para>
76 </listitem>
77 </varlistentry>
78 </variablelist>
79 </refsect1>
81 <refsect1>
82 <title>Compatibility</title>
84 <para>
85 There is no <command>ALTER SCHEMA</command> statement in the SQL
86 standard.
87 </para>
88 </refsect1>
90 <refsect1>
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>
96 </simplelist>
97 </refsect1>
99 </refentry>