<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_schema.sgml,v 1.1 2003/06/27 14:45:26 petere Exp $
PostgreSQL documentation
-->

<refentry id="SQL-ALTERSCHEMA">
 <refmeta>
  <refentrytitle id="SQL-ALTERSCHEMA-title">ALTER SCHEMA</refentrytitle>
  <refmiscinfo>SQL - Schema Statements</refmiscinfo>
 </refmeta>

 <refnamediv>
  <refname>ALTER SCHEMA</refname>
  <refpurpose>change the definition of a schema</refpurpose>
 </refnamediv>

 <refsynopsisdiv>
<synopsis>
ALTER SCHEMA <replaceable>name</replaceable> RENAME TO <replaceable>newname</replaceable>
</synopsis>
 </refsynopsisdiv>

 <refsect1>
  <title>Description</title>

  <para>
   <command>ALTER SCHEMA</command> changes the definition of a schema.
   The only functionality is to rename the schema.  To rename a schema
   you must own the schema and have the privilege
   <literal>CREATE</literal> for the database.
  </para>
 </refsect1>

 <refsect1>
  <title>Parameter</title>

  <variablelist>
   <varlistentry>
    <term><replaceable>name</replaceable></term>
    <listitem>
     <para>
      Name of a schema
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><replaceable>newname</replaceable></term>
    <listitem>
     <para>
      The new name of the schema
     </para>
    </listitem>
   </varlistentry>
  </variablelist>
 </refsect1>

 <refsect1>
  <title>Diagnostics</title>

  <variablelist>
   <varlistentry>
    <term><computeroutput>ALTER SCHEMA</computeroutput></term>
    <listitem>
     <para>
      Message returned if the alteration was successful.
     </para>
    </listitem>
   </varlistentry>
  </variablelist>
 </refsect1>

 <refsect1>
  <title>Compatibility</title>
    
  <para>
   There is no <command>ALTER SCHEMA</command> statement in the SQL
   standard.
  </para>
 </refsect1>

 <refsect1>
  <title>See Also</title>

  <simplelist type="inline">
   <member><xref linkend="sql-createschema" endterm="sql-createschema-title"></member>
   <member><xref linkend="sql-dropschema" endterm="sql-dropschema-title"></member>
  </simplelist>
 </refsect1>

</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:nil
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:"../reference.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:"/usr/lib/sgml/catalog"
sgml-local-ecat-files:nil
End:
-->
