⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 alter_type.sgml

📁 PostgreSQL 8.1.4的源码 适用于Linux下的开源数据库系统
💻 SGML
字号:
<!--$PostgreSQL: pgsql/doc/src/sgml/ref/alter_type.sgml,v 1.3 2005/10/13 22:44:51 tgl Exp $PostgreSQL documentation--><refentry id="SQL-ALTERTYPE"> <refmeta>  <refentrytitle id="sql-altertype-title">ALTER TYPE</refentrytitle>  <refmiscinfo>SQL - Language Statements</refmiscinfo> </refmeta> <refnamediv>  <refname>   ALTER TYPE  </refname>  <refpurpose>   change the definition of a type  </refpurpose> </refnamediv> <indexterm zone="sql-altertype">  <primary>ALTER TYPE</primary> </indexterm> <refsynopsisdiv>  <synopsis>ALTER TYPE <replaceable class="PARAMETER">name</replaceable> OWNER TO <replaceable class="PARAMETER">new_owner</replaceable> ALTER TYPE <replaceable class="PARAMETER">name</replaceable> SET SCHEMA <replaceable class="PARAMETER">new_schema</replaceable>  </synopsis> </refsynopsisdiv> <refsect1>  <title>Description</title>  <para>   <command>ALTER TYPE</command> changes the definition of an existing type.   The only currently available capabilities are changing the owner and schema   of a type.  </para>  <para>   You must own the type to use <command>ALTER TYPE</>.   To change the schema of a type, you must also have   <literal>CREATE</literal> privilege on the new schema.   To alter the owner, you must also be a direct or indirect member of the new   owning role, and that role must have <literal>CREATE</literal> privilege on   the type's schema.  (These restrictions enforce that altering the owner   doesn't do anything you couldn't do by dropping and recreating the type.   However, a superuser can alter ownership of any type anyway.)  </para> </refsect1> <refsect1>  <title>Parameters</title>   <para>    <variablelist>     <varlistentry>      <term><replaceable class="PARAMETER">name</replaceable></term>      <listitem>       <para>        The name (possibly schema-qualified) of an existing type to        alter.       </para>      </listitem>     </varlistentry>     <varlistentry>      <term><replaceable class="PARAMETER">new_owner</replaceable></term>      <listitem>       <para>        The user name of the new owner of the type.       </para>      </listitem>     </varlistentry>     <varlistentry>      <term><replaceable class="PARAMETER">new_schema</replaceable></term>      <listitem>       <para>        The new schema for the type.       </para>      </listitem>     </varlistentry>    </variablelist>   </para>  </refsect1> <refsect1>  <title>Examples</title>  <para>    To change the owner of the user-defined type <literal>email</literal>   to <literal>joe</literal>:   <programlisting>ALTER TYPE email OWNER TO joe;   </programlisting>  </para>  <para>   To change the schema of the user-defined type <literal>email</literal>   to <literal>customers</literal>:   <programlisting>ALTER TYPE email SET SCHEMA customers;   </programlisting>  </para> </refsect1> <refsect1>  <title>Compatibility</title>      <para>   There is no <command>ALTER TYPE</command> statement in the SQL   standard.  </para> </refsect1></refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:nilsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tsgml-parent-document:nilsgml-default-dtd-file:"../reference.ced"sgml-exposed-tags:nilsgml-local-catalogs:"/usr/lib/sgml/catalog"sgml-local-ecat-files:nilEnd:-->

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -