2003-06-27 16:45:32 +02:00
|
|
|
<!--
|
2005-10-14 00:44:51 +02:00
|
|
|
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_schema.sgml,v 1.8 2005/10/13 22:44:51 tgl Exp $
|
2003-06-27 16:45:32 +02:00
|
|
|
PostgreSQL documentation
|
|
|
|
-->
|
|
|
|
|
|
|
|
<refentry id="SQL-ALTERSCHEMA">
|
|
|
|
<refmeta>
|
|
|
|
<refentrytitle id="SQL-ALTERSCHEMA-title">ALTER SCHEMA</refentrytitle>
|
2003-11-08 12:06:37 +01:00
|
|
|
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
2003-06-27 16:45:32 +02:00
|
|
|
</refmeta>
|
|
|
|
|
|
|
|
<refnamediv>
|
|
|
|
<refname>ALTER SCHEMA</refname>
|
|
|
|
<refpurpose>change the definition of a schema</refpurpose>
|
|
|
|
</refnamediv>
|
|
|
|
|
2003-08-31 19:32:24 +02:00
|
|
|
<indexterm zone="sql-alterschema">
|
|
|
|
<primary>ALTER SCHEMA</primary>
|
|
|
|
</indexterm>
|
|
|
|
|
2003-06-27 16:45:32 +02:00
|
|
|
<refsynopsisdiv>
|
|
|
|
<synopsis>
|
|
|
|
ALTER SCHEMA <replaceable>name</replaceable> RENAME TO <replaceable>newname</replaceable>
|
2004-06-25 23:55:59 +02:00
|
|
|
ALTER SCHEMA <replaceable>name</replaceable> OWNER TO <replaceable>newowner</replaceable>
|
2003-06-27 16:45:32 +02:00
|
|
|
</synopsis>
|
|
|
|
</refsynopsisdiv>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>Description</title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
<command>ALTER SCHEMA</command> changes the definition of a schema.
|
2005-10-14 00:44:51 +02:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
You must own the schema to use <command>ALTER SCHEMA</>.
|
|
|
|
To rename a schema you must also have the
|
|
|
|
<literal>CREATE</literal> privilege for the database.
|
|
|
|
To alter the owner, you must also be a direct or
|
|
|
|
indirect member of the new owning role, and you must have the
|
|
|
|
<literal>CREATE</literal> privilege for the database.
|
|
|
|
(Note that superusers have all these privileges automatically.)
|
2003-06-27 16:45:32 +02:00
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1>
|
2003-09-12 02:12:47 +02:00
|
|
|
<title>Parameters</title>
|
2003-06-27 16:45:32 +02:00
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term><replaceable>name</replaceable></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2004-06-25 23:55:59 +02:00
|
|
|
The name of an existing schema.
|
2003-06-27 16:45:32 +02:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><replaceable>newname</replaceable></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2004-06-25 23:55:59 +02:00
|
|
|
The new name of the schema. The new name cannot
|
|
|
|
begin with <literal>pg_</literal>, as such names
|
|
|
|
are reserved for system schemas.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><replaceable class="parameter">newowner</replaceable></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The new owner of the schema.
|
2003-06-27 16:45:32 +02:00
|
|
|
</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:
|
|
|
|
-->
|