aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/ref/allfiles.sgml5
-rw-r--r--doc/src/sgml/ref/alter_aggregate.sgml24
-rw-r--r--doc/src/sgml/ref/alter_conversion.sgml22
-rw-r--r--doc/src/sgml/ref/alter_function.sgml28
-rw-r--r--doc/src/sgml/ref/alter_opclass.sgml18
-rw-r--r--doc/src/sgml/ref/alter_operator.sgml127
-rw-r--r--doc/src/sgml/ref/alter_schema.sgml24
-rw-r--r--doc/src/sgml/ref/alter_tablespace.sgml125
-rw-r--r--doc/src/sgml/ref/alter_type.sgml106
-rw-r--r--doc/src/sgml/ref/create_operator.sgml53
-rw-r--r--doc/src/sgml/ref/create_schema.sgml6
-rw-r--r--doc/src/sgml/ref/create_tablespace.sgml7
-rw-r--r--doc/src/sgml/ref/create_type.sgml3
-rw-r--r--doc/src/sgml/ref/drop_operator.sgml5
-rw-r--r--doc/src/sgml/ref/drop_tablespace.sgml3
-rw-r--r--doc/src/sgml/ref/drop_type.sgml3
-rw-r--r--doc/src/sgml/reference.sgml5
17 files changed, 509 insertions, 55 deletions
diff --git a/doc/src/sgml/ref/allfiles.sgml b/doc/src/sgml/ref/allfiles.sgml
index f21410e7c13..f02edd4cff2 100644
--- a/doc/src/sgml/ref/allfiles.sgml
+++ b/doc/src/sgml/ref/allfiles.sgml
@@ -1,5 +1,5 @@
<!--
-$PostgreSQL: pgsql/doc/src/sgml/ref/allfiles.sgml,v 1.58 2004/06/18 21:24:01 tgl Exp $
+$PostgreSQL: pgsql/doc/src/sgml/ref/allfiles.sgml,v 1.59 2004/06/25 21:55:50 tgl Exp $
PostgreSQL documentation
Complete list of usable sgml source files in this directory.
-->
@@ -13,11 +13,14 @@ Complete list of usable sgml source files in this directory.
<!entity alterFunction system "alter_function.sgml">
<!entity alterGroup system "alter_group.sgml">
<!entity alterLanguage system "alter_language.sgml">
+<!entity alterOperator system "alter_operator.sgml">
<!entity alterOperatorClass system "alter_opclass.sgml">
<!entity alterSchema system "alter_schema.sgml">
<!entity alterSequence system "alter_sequence.sgml">
<!entity alterTable system "alter_table.sgml">
+<!entity alterTableSpace system "alter_tablespace.sgml">
<!entity alterTrigger system "alter_trigger.sgml">
+<!entity alterType system "alter_type.sgml">
<!entity alterUser system "alter_user.sgml">
<!entity analyze system "analyze.sgml">
<!entity begin system "begin.sgml">
diff --git a/doc/src/sgml/ref/alter_aggregate.sgml b/doc/src/sgml/ref/alter_aggregate.sgml
index 112242f1421..bfdb1761d5b 100644
--- a/doc/src/sgml/ref/alter_aggregate.sgml
+++ b/doc/src/sgml/ref/alter_aggregate.sgml
@@ -1,5 +1,5 @@
<!--
-$PostgreSQL: pgsql/doc/src/sgml/ref/alter_aggregate.sgml,v 1.4 2003/11/29 19:51:38 pgsql Exp $
+$PostgreSQL: pgsql/doc/src/sgml/ref/alter_aggregate.sgml,v 1.5 2004/06/25 21:55:50 tgl Exp $
PostgreSQL documentation
-->
@@ -21,6 +21,7 @@ PostgreSQL documentation
<refsynopsisdiv>
<synopsis>
ALTER AGGREGATE <replaceable>name</replaceable> ( <replaceable>type</replaceable> ) RENAME TO <replaceable>newname</replaceable>
+ALTER AGGREGATE <replaceable>name</replaceable> ( <replaceable>type</replaceable> ) OWNER TO <replaceable>newowner</replaceable>
</synopsis>
</refsynopsisdiv>
@@ -29,8 +30,7 @@ ALTER AGGREGATE <replaceable>name</replaceable> ( <replaceable>type</replaceable
<para>
<command>ALTER AGGREGATE</command> changes the definition of an
- aggregate function. The only currently available functionality is to
- rename the aggregate function.
+ aggregate function.
</para>
</refsect1>
@@ -65,6 +65,16 @@ ALTER AGGREGATE <replaceable>name</replaceable> ( <replaceable>type</replaceable
</para>
</listitem>
</varlistentry>
+
+ <varlistentry>
+ <term><replaceable class="parameter">newowner</replaceable></term>
+ <listitem>
+ <para>
+ The new owner of the aggregate function.
+ You must be a superuser to change an aggregate's owner.
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
</refsect1>
@@ -78,6 +88,14 @@ ALTER AGGREGATE <replaceable>name</replaceable> ( <replaceable>type</replaceable
ALTER AGGREGATE myavg(integer) RENAME TO my_average;
</programlisting>
</para>
+
+ <para>
+ To change the owner of the aggregate function <literal>myavg</literal> for type
+ <type>integer</type> to <literal>joe</literal>:
+<programlisting>
+ALTER AGGREGATE myavg(integer) OWNER TO joe;
+</programlisting>
+ </para>
</refsect1>
<refsect1>
diff --git a/doc/src/sgml/ref/alter_conversion.sgml b/doc/src/sgml/ref/alter_conversion.sgml
index 08d167eb3cc..024d03212cb 100644
--- a/doc/src/sgml/ref/alter_conversion.sgml
+++ b/doc/src/sgml/ref/alter_conversion.sgml
@@ -1,5 +1,5 @@
<!--
-$PostgreSQL: pgsql/doc/src/sgml/ref/alter_conversion.sgml,v 1.4 2003/11/29 19:51:38 pgsql Exp $
+$PostgreSQL: pgsql/doc/src/sgml/ref/alter_conversion.sgml,v 1.5 2004/06/25 21:55:50 tgl Exp $
PostgreSQL documentation
-->
@@ -21,6 +21,7 @@ PostgreSQL documentation
<refsynopsisdiv>
<synopsis>
ALTER CONVERSION <replaceable>name</replaceable> RENAME TO <replaceable>newname</replaceable>
+ALTER CONVERSION <replaceable>name</replaceable> OWNER TO <replaceable>newowner</replaceable>
</synopsis>
</refsynopsisdiv>
@@ -29,7 +30,6 @@ ALTER CONVERSION <replaceable>name</replaceable> RENAME TO <replaceable>newname<
<para>
<command>ALTER CONVERSION</command> changes the definition of a
- conversion. The only currently available functionality is to rename the
conversion.
</para>
</refsect1>
@@ -55,6 +55,16 @@ ALTER CONVERSION <replaceable>name</replaceable> RENAME TO <replaceable>newname<
</para>
</listitem>
</varlistentry>
+
+ <varlistentry>
+ <term><replaceable class="parameter">newowner</replaceable></term>
+ <listitem>
+ <para>
+ The new owner of the conversion. To change the owner of a conversion,
+ you must be a superuser.
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
</refsect1>
@@ -68,6 +78,14 @@ ALTER CONVERSION <replaceable>name</replaceable> RENAME TO <replaceable>newname<
ALTER CONVERSION iso_8859_1_to_utf_8 RENAME TO latin1_to_unicode;
</programlisting>
</para>
+
+ <para>
+ To change the owner of the conversion <literal>iso_8859_1_to_utf_8</literal> to
+ <literal>joe</literal>:
+<programlisting>
+ALTER CONVERSION iso_8859_1_to_utf_8 OWNER TO joe;
+</programlisting>
+ </para>
</refsect1>
<refsect1>
diff --git a/doc/src/sgml/ref/alter_function.sgml b/doc/src/sgml/ref/alter_function.sgml
index 71ae81893b3..00dfcac007a 100644
--- a/doc/src/sgml/ref/alter_function.sgml
+++ b/doc/src/sgml/ref/alter_function.sgml
@@ -1,5 +1,5 @@
<!--
-$PostgreSQL: pgsql/doc/src/sgml/ref/alter_function.sgml,v 1.4 2003/11/29 19:51:38 pgsql Exp $
+$PostgreSQL: pgsql/doc/src/sgml/ref/alter_function.sgml,v 1.5 2004/06/25 21:55:50 tgl Exp $
PostgreSQL documentation
-->
@@ -21,6 +21,7 @@ PostgreSQL documentation
<refsynopsisdiv>
<synopsis>
ALTER FUNCTION <replaceable>name</replaceable> ( [ <replaceable class="parameter">type</replaceable> [, ...] ] ) RENAME TO <replaceable>newname</replaceable>
+ALTER FUNCTION <replaceable>name</replaceable> ( [ <replaceable class="parameter">type</replaceable> [, ...] ] ) OWNER TO <replaceable>newowner</replaceable>
</synopsis>
</refsynopsisdiv>
@@ -29,7 +30,7 @@ ALTER FUNCTION <replaceable>name</replaceable> ( [ <replaceable class="parameter
<para>
<command>ALTER FUNCTION</command> changes the definition of a
- function. The only functionality is to rename the function.
+ function.
</para>
</refsect1>
@@ -63,6 +64,19 @@ ALTER FUNCTION <replaceable>name</replaceable> ( [ <replaceable class="parameter
</para>
</listitem>
</varlistentry>
+
+ <varlistentry>
+ <term><replaceable class="parameter">newowner</replaceable></term>
+ <listitem>
+ <para>
+ The new owner of the function.
+ To change the owner of a function, you must be a superuser.
+ Note that if the function is marked
+ <literal>SECURITY DEFINER</literal>,
+ it will subsequently execute as the new owner.
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
</refsect1>
@@ -76,6 +90,14 @@ ALTER FUNCTION <replaceable>name</replaceable> ( [ <replaceable class="parameter
ALTER FUNCTION sqrt(integer) RENAME TO square_root;
</programlisting>
</para>
+
+ <para>
+ To change the owner of the function <literal>sqrt</literal> for type
+ <type>integer</type> to <literal>joe</literal>:
+<programlisting>
+ALTER FUNCTION sqrt(integer) OWNER TO joe;
+</programlisting>
+ </para>
</refsect1>
<refsect1>
@@ -84,7 +106,7 @@ ALTER FUNCTION sqrt(integer) RENAME TO square_root;
<para>
There is an <command>ALTER FUNCTION</command> statement in the SQL
standard, but it does not provide the option to rename the
- function.
+ function or change the owner.
</para>
</refsect1>
diff --git a/doc/src/sgml/ref/alter_opclass.sgml b/doc/src/sgml/ref/alter_opclass.sgml
index 8a5e3085703..d4171ceb2f9 100644
--- a/doc/src/sgml/ref/alter_opclass.sgml
+++ b/doc/src/sgml/ref/alter_opclass.sgml
@@ -1,5 +1,5 @@
<!--
-$PostgreSQL: pgsql/doc/src/sgml/ref/alter_opclass.sgml,v 1.4 2003/11/29 19:51:38 pgsql Exp $
+$PostgreSQL: pgsql/doc/src/sgml/ref/alter_opclass.sgml,v 1.5 2004/06/25 21:55:50 tgl Exp $
PostgreSQL documentation
-->
@@ -21,6 +21,7 @@ PostgreSQL documentation
<refsynopsisdiv>
<synopsis>
ALTER OPERATOR CLASS <replaceable>name</replaceable> USING <replaceable class="parameter">index_method</replaceable> RENAME TO <replaceable>newname</replaceable>
+ALTER OPERATOR CLASS <replaceable>name</replaceable> USING <replaceable class="parameter">index_method</replaceable> OWNER TO <replaceable>newowner</replaceable>
</synopsis>
</refsynopsisdiv>
@@ -29,8 +30,7 @@ ALTER OPERATOR CLASS <replaceable>name</replaceable> USING <replaceable class="p
<para>
<command>ALTER OPERATOR CLASS</command> changes the definition of
- an operator class. The only functionality is to rename the
- operator class.
+ an operator class.
</para>
</refsect1>
@@ -65,7 +65,17 @@ ALTER OPERATOR CLASS <replaceable>name</replaceable> USING <replaceable class="p
</para>
</listitem>
</varlistentry>
- </variablelist>
+
+ <varlistentry>
+ <term><replaceable class="parameter">newowner</replaceable></term>
+ <listitem>
+ <para>
+ The new owner of the operator class.
+ You must be a superuser to change the owner of an operator class.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
</refsect1>
<refsect1>
diff --git a/doc/src/sgml/ref/alter_operator.sgml b/doc/src/sgml/ref/alter_operator.sgml
new file mode 100644
index 00000000000..cfec153f2bb
--- /dev/null
+++ b/doc/src/sgml/ref/alter_operator.sgml
@@ -0,0 +1,127 @@
+<!--
+$PostgreSQL: pgsql/doc/src/sgml/ref/alter_operator.sgml,v 1.1 2004/06/25 21:55:50 tgl Exp $
+PostgreSQL documentation
+-->
+
+<refentry id="SQL-ALTEROPERATOR">
+ <refmeta>
+ <refentrytitle id="SQL-ALTEROPERATOR-TITLE">ALTER OPERATOR</refentrytitle>
+ <refmiscinfo>SQL - Language Statements</refmiscinfo>
+ </refmeta>
+
+ <refnamediv>
+ <refname>ALTER OPERATOR</refname>
+ <refpurpose>change the definition of an operator</refpurpose>
+ </refnamediv>
+
+ <indexterm zone="sql-alteroperator">
+ <primary>ALTER OPERATOR</primary>
+ </indexterm>
+
+ <refsynopsisdiv>
+<synopsis>
+ALTER OPERATOR <replaceable>name</replaceable> ( { <replaceable>lefttype</replaceable> | NONE } , { <replaceable>righttype</replaceable> | NONE } ) OWNER TO <replaceable>newowner</replaceable>
+</synopsis>
+ </refsynopsisdiv>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para>
+ <command>ALTER OPERATOR</command> changes the definition of
+ an operator. The only currently available functionality is to change the
+ owner of the operator.
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>Parameters</title>
+
+ <variablelist>
+ <varlistentry>
+ <term><replaceable class="parameter">name</replaceable></term>
+ <listitem>
+ <para>
+ The name (optionally schema-qualified) of an existing operator.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><replaceable class="parameter">lefttype</replaceable></term>
+ <listitem>
+ <para>
+ The data type of the operator's left operand; write
+ <literal>NONE</literal> if the operator has no left operand.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><replaceable class="parameter">righttype</replaceable></term>
+ <listitem>
+ <para>
+ The data type of the operator's right operand; write
+ <literal>NONE</literal> if the operator has no right operand.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><replaceable class="parameter">newowner</replaceable></term>
+ <listitem>
+ <para>
+ The new owner of the operator.
+ You must be a superuser to change the owner of an operator.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect1>
+
+ <refsect1>
+ <title>Examples</title>
+
+ <para>
+ Change the owner of a custom operator <literal>a @@ b</literal> for type <type>text</type>:
+<programlisting>
+ALTER OPERATOR @@ (text, text) OWNER TO joe;
+</programlisting>
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>Compatibility</title>
+
+ <para>
+ There is no <command>ALTER OPERATOR</command> statement in
+ the SQL standard.
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>See Also</title>
+
+ <simplelist type="inline">
+ <member><xref linkend="sql-createoperator" endterm="sql-createoperator-title"></member>
+ <member><xref linkend="sql-dropoperator" endterm="sql-dropoperator-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:
+-->
diff --git a/doc/src/sgml/ref/alter_schema.sgml b/doc/src/sgml/ref/alter_schema.sgml
index 866db728689..702df1da396 100644
--- a/doc/src/sgml/ref/alter_schema.sgml
+++ b/doc/src/sgml/ref/alter_schema.sgml
@@ -1,5 +1,5 @@
<!--
-$PostgreSQL: pgsql/doc/src/sgml/ref/alter_schema.sgml,v 1.6 2003/11/29 19:51:38 pgsql Exp $
+$PostgreSQL: pgsql/doc/src/sgml/ref/alter_schema.sgml,v 1.7 2004/06/25 21:55:50 tgl Exp $
PostgreSQL documentation
-->
@@ -21,6 +21,7 @@ PostgreSQL documentation
<refsynopsisdiv>
<synopsis>
ALTER SCHEMA <replaceable>name</replaceable> RENAME TO <replaceable>newname</replaceable>
+ALTER SCHEMA <replaceable>name</replaceable> OWNER TO <replaceable>newowner</replaceable>
</synopsis>
</refsynopsisdiv>
@@ -29,9 +30,9 @@ ALTER SCHEMA <replaceable>name</replaceable> RENAME TO <replaceable>newname</rep
<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.
+ To rename a schema you must own the schema and have the privilege
+ <literal>CREATE</literal> for the database. To change the owner
+ of a schema, you must be a superuser.
</para>
</refsect1>
@@ -43,7 +44,7 @@ ALTER SCHEMA <replaceable>name</replaceable> RENAME TO <replaceable>newname</rep
<term><replaceable>name</replaceable></term>
<listitem>
<para>
- Name of a schema
+ The name of an existing schema.
</para>
</listitem>
</varlistentry>
@@ -52,7 +53,18 @@ ALTER SCHEMA <replaceable>name</replaceable> RENAME TO <replaceable>newname</rep
<term><replaceable>newname</replaceable></term>
<listitem>
<para>
- The new name of the schema
+ 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.
</para>
</listitem>
</varlistentry>
diff --git a/doc/src/sgml/ref/alter_tablespace.sgml b/doc/src/sgml/ref/alter_tablespace.sgml
new file mode 100644
index 00000000000..bdfe4b81553
--- /dev/null
+++ b/doc/src/sgml/ref/alter_tablespace.sgml
@@ -0,0 +1,125 @@
+<!--
+$PostgreSQL: pgsql/doc/src/sgml/ref/alter_tablespace.sgml,v 1.1 2004/06/25 21:55:50 tgl Exp $
+PostgreSQL documentation
+-->
+
+<refentry id="SQL-ALTERTABLESPACE">
+ <refmeta>
+ <refentrytitle id="SQL-ALTERTABLESPACE-TITLE">ALTER TABLESPACE</refentrytitle>
+ <refmiscinfo>SQL - Language Statements</refmiscinfo>
+ </refmeta>
+
+ <refnamediv>
+ <refname>ALTER TABLESPACE</refname>
+ <refpurpose>change the definition of a tablespace</refpurpose>
+ </refnamediv>
+
+ <indexterm zone="sql-altertablespace">
+ <primary>ALTER TABLESPACE</primary>
+ </indexterm>
+
+ <refsynopsisdiv>
+<synopsis>
+ALTER TABLESPACE <replaceable>name</replaceable> RENAME TO <replaceable>newname</replaceable>
+ALTER TABLESPACE <replaceable>name</replaceable> OWNER TO <replaceable>newowner</replaceable>
+</synopsis>
+ </refsynopsisdiv>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para>
+ <command>ALTER TABLESPACE</command> changes the definition of
+ a tablespace.
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>Parameters</title>
+
+ <variablelist>
+ <varlistentry>
+ <term><replaceable class="parameter">name</replaceable></term>
+ <listitem>
+ <para>
+ The name of an existing tablespace.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><replaceable class="parameter">newname</replaceable></term>
+ <listitem>
+ <para>
+ The new name of the tablespace. The new name cannot
+ begin with <literal>pg_</literal>, as such names
+ are reserved for system tablespaces.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><replaceable class="parameter">newowner</replaceable></term>
+ <listitem>
+ <para>
+ The new owner of the tablespace.
+ You must be a superuser to change the owner of a tablespace.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect1>
+
+ <refsect1>
+ <title>Examples</title>
+
+ <para>
+ Rename tablespace <literal>index_space</literal> to <literal>fast_raid</literal>:
+<programlisting>
+ALTER TABLESPACE index_space RENAME TO fast_raid;
+</programlisting>
+ </para>
+
+ <para>
+ Change the owner of tablespace <literal>index_space</literal>:
+<programlisting>
+ALTER TABLESPACE index_space OWNER TO mary;
+</programlisting>
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>Compatibility</title>
+
+ <para>
+ There is no <command>ALTER TABLESPACE</command> statement in
+ the SQL standard.
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>See Also</title>
+
+ <simplelist type="inline">
+ <member><xref linkend="sql-createtablespace" endterm="sql-createtablespace-title"></member>
+ <member><xref linkend="sql-droptablespace" endterm="sql-droptablespace-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:
+-->
diff --git a/doc/src/sgml/ref/alter_type.sgml b/doc/src/sgml/ref/alter_type.sgml
new file mode 100644
index 00000000000..33830c04c04
--- /dev/null
+++ b/doc/src/sgml/ref/alter_type.sgml
@@ -0,0 +1,106 @@
+<!--
+$PostgreSQL: pgsql/doc/src/sgml/ref/alter_type.sgml,v 1.1 2004/06/25 21:55:50 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>
+ </synopsis>
+ </refsynopsisdiv>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para>
+ <command>ALTER TYPE</command> changes the definition of an existing type.
+ The only currently available capability is changing the owner of a type.
+ </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.
+ You must be a superuser to change a type's owner.
+ </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>
+ </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 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:
+-->
diff --git a/doc/src/sgml/ref/create_operator.sgml b/doc/src/sgml/ref/create_operator.sgml
index 1001b8f33fb..029d1af0d90 100644
--- a/doc/src/sgml/ref/create_operator.sgml
+++ b/doc/src/sgml/ref/create_operator.sgml
@@ -1,5 +1,5 @@
<!--
-$PostgreSQL: pgsql/doc/src/sgml/ref/create_operator.sgml,v 1.41 2003/12/11 20:13:53 petere Exp $
+$PostgreSQL: pgsql/doc/src/sgml/ref/create_operator.sgml,v 1.42 2004/06/25 21:55:50 tgl Exp $
PostgreSQL documentation
-->
@@ -109,13 +109,13 @@ CREATE OPERATOR <replaceable>name</replaceable> (
<term><replaceable class="parameter">name</replaceable></term>
<listitem>
<para>
- The name of the operator to be defined. See above for allowable
- characters. The name may be schema-qualified, for example
- <literal>CREATE OPERATOR myschema.+ (...)</>. If not, then
- the operator is created in the current schema. Two operators
- in the same schema can have the same name if they operate on
- different data types. This is called
- <firstterm>overloading</>.
+ The name of the operator to be defined. See above for allowable
+ characters. The name may be schema-qualified, for example
+ <literal>CREATE OPERATOR myschema.+ (...)</>. If not, then
+ the operator is created in the current schema. Two operators
+ in the same schema can have the same name if they operate on
+ different data types. This is called
+ <firstterm>overloading</>.
</para>
</listitem>
</varlistentry>
@@ -124,7 +124,7 @@ CREATE OPERATOR <replaceable>name</replaceable> (
<term><replaceable class="parameter">funcname</replaceable></term>
<listitem>
<para>
- The function used to implement this operator.
+ The function used to implement this operator.
</para>
</listitem>
</varlistentry>
@@ -133,8 +133,8 @@ CREATE OPERATOR <replaceable>name</replaceable> (
<term><replaceable class="parameter">lefttype</replaceable></term>
<listitem>
<para>
- The data type of the operator's left operand, if any.
- This option would be omitted for a left-unary operator.
+ The data type of the operator's left operand, if any.
+ This option would be omitted for a left-unary operator.
</para>
</listitem>
</varlistentry>
@@ -143,8 +143,8 @@ CREATE OPERATOR <replaceable>name</replaceable> (
<term><replaceable class="parameter">righttype</replaceable></term>
<listitem>
<para>
- The data type of the operator's right operand, if any.
- This option would be omitted for a right-unary operator.
+ The data type of the operator's right operand, if any.
+ This option would be omitted for a right-unary operator.
</para>
</listitem>
</varlistentry>
@@ -153,7 +153,7 @@ CREATE OPERATOR <replaceable>name</replaceable> (
<term><replaceable class="parameter">com_op</replaceable></term>
<listitem>
<para>
- The commutator of this operator.
+ The commutator of this operator.
</para>
</listitem>
</varlistentry>
@@ -162,7 +162,7 @@ CREATE OPERATOR <replaceable>name</replaceable> (
<term><replaceable class="parameter">neg_op</replaceable></term>
<listitem>
<para>
- The negator of this operator.
+ The negator of this operator.
</para>
</listitem>
</varlistentry>
@@ -171,7 +171,7 @@ CREATE OPERATOR <replaceable>name</replaceable> (
<term><replaceable class="parameter">res_proc</replaceable></term>
<listitem>
<para>
- The restriction selectivity estimator function for this operator.
+ The restriction selectivity estimator function for this operator.
</para>
</listitem>
</varlistentry>
@@ -180,7 +180,7 @@ CREATE OPERATOR <replaceable>name</replaceable> (
<term><replaceable class="parameter">join_proc</replaceable></term>
<listitem>
<para>
- The join selectivity estimator function for this operator.
+ The join selectivity estimator function for this operator.
</para>
</listitem>
</varlistentry>
@@ -207,8 +207,8 @@ CREATE OPERATOR <replaceable>name</replaceable> (
<term><replaceable class="parameter">left_sort_op</replaceable></term>
<listitem>
<para>
- If this operator can support a merge join, the less-than
- operator that sorts the left-hand data type of this operator.
+ If this operator can support a merge join, the less-than
+ operator that sorts the left-hand data type of this operator.
</para>
</listitem>
</varlistentry>
@@ -217,8 +217,8 @@ CREATE OPERATOR <replaceable>name</replaceable> (
<term><replaceable class="parameter">right_sort_op</replaceable></term>
<listitem>
<para>
- If this operator can support a merge join, the less-than
- operator that sorts the right-hand data type of this operator.
+ If this operator can support a merge join, the less-than
+ operator that sorts the right-hand data type of this operator.
</para>
</listitem>
</varlistentry>
@@ -227,8 +227,8 @@ CREATE OPERATOR <replaceable>name</replaceable> (
<term><replaceable class="parameter">less_than_op</replaceable></term>
<listitem>
<para>
- If this operator can support a merge join, the less-than
- operator that compares the input data types of this operator.
+ If this operator can support a merge join, the less-than
+ operator that compares the input data types of this operator.
</para>
</listitem>
</varlistentry>
@@ -237,8 +237,8 @@ CREATE OPERATOR <replaceable>name</replaceable> (
<term><replaceable class="parameter">greater_than_op</replaceable></term>
<listitem>
<para>
- If this operator can support a merge join, the greater-than
- operator that compares the input data types of this operator.
+ If this operator can support a merge join, the greater-than
+ operator that compares the input data types of this operator.
</para>
</listitem>
</varlistentry>
@@ -263,7 +263,8 @@ COMMUTATOR = OPERATOR(myschema.===) ,
<para>
Use <command>DROP OPERATOR</command> to delete user-defined
- operators from a database.
+ operators from a database. Use <command>ALTER OPERATOR</command>
+ to modify operators in a database.
</para>
</refsect1>
diff --git a/doc/src/sgml/ref/create_schema.sgml b/doc/src/sgml/ref/create_schema.sgml
index 8668612cc6a..4f56341ce36 100644
--- a/doc/src/sgml/ref/create_schema.sgml
+++ b/doc/src/sgml/ref/create_schema.sgml
@@ -1,5 +1,5 @@
<!--
-$PostgreSQL: pgsql/doc/src/sgml/ref/create_schema.sgml,v 1.12 2004/06/18 06:13:05 tgl Exp $
+$PostgreSQL: pgsql/doc/src/sgml/ref/create_schema.sgml,v 1.13 2004/06/25 21:55:50 tgl Exp $
PostgreSQL documentation
-->
@@ -64,7 +64,9 @@ CREATE SCHEMA AUTHORIZATION <replaceable class="parameter">username</replaceable
<listitem>
<para>
The name of a schema to be created. If this is omitted, the user name
- is used as the schema name.
+ is used as the schema name. The name cannot
+ begin with <literal>pg_</literal>, as such names
+ are reserved for system schemas.
</para>
</listitem>
</varlistentry>
diff --git a/doc/src/sgml/ref/create_tablespace.sgml b/doc/src/sgml/ref/create_tablespace.sgml
index 9f670a817d6..08ff4e3254b 100644
--- a/doc/src/sgml/ref/create_tablespace.sgml
+++ b/doc/src/sgml/ref/create_tablespace.sgml
@@ -1,5 +1,5 @@
<!--
-$PostgreSQL: pgsql/doc/src/sgml/ref/create_tablespace.sgml,v 1.1 2004/06/18 06:13:05 tgl Exp $
+$PostgreSQL: pgsql/doc/src/sgml/ref/create_tablespace.sgml,v 1.2 2004/06/25 21:55:50 tgl Exp $
PostgreSQL documentation
-->
@@ -56,7 +56,9 @@ CREATE TABLESPACE <replaceable class="parameter">tablespacename</replaceable> [
<term><replaceable class="parameter">tablespacename</replaceable></term>
<listitem>
<para>
- The name of a tablespace to be created.
+ The name of a tablespace to be created. The name cannot
+ begin with <literal>pg_</literal>, as such names
+ are reserved for system tablespaces.
</para>
</listitem>
</varlistentry>
@@ -133,6 +135,7 @@ CREATE TABLESPACE indexspace OWNER genevieve LOCATION '/data/indexes';
<member><xref linkend="sql-createindex" endterm="sql-createindex-title"></member>
<member><xref linkend="sql-createsequence" endterm="sql-createsequence-title"></member>
<member><xref linkend="sql-droptablespace" endterm="sql-droptablespace-title"></member>
+ <member><xref linkend="sql-altertablespace" endterm="sql-altertablespace-title"></member>
</simplelist>
</refsect1>
diff --git a/doc/src/sgml/ref/create_type.sgml b/doc/src/sgml/ref/create_type.sgml
index b35a1805ca4..b7d1ac64e0a 100644
--- a/doc/src/sgml/ref/create_type.sgml
+++ b/doc/src/sgml/ref/create_type.sgml
@@ -1,5 +1,5 @@
<!--
-$PostgreSQL: pgsql/doc/src/sgml/ref/create_type.sgml,v 1.51 2004/06/06 00:41:25 tgl Exp $
+$PostgreSQL: pgsql/doc/src/sgml/ref/create_type.sgml,v 1.52 2004/06/25 21:55:50 tgl Exp $
PostgreSQL documentation
-->
@@ -546,6 +546,7 @@ CREATE TABLE big_objs (
<simplelist type="inline">
<member><xref linkend="sql-createfunction" endterm="sql-createfunction-title"></member>
<member><xref linkend="sql-droptype" endterm="sql-droptype-title"></member>
+ <member><xref linkend="sql-altertype" endterm="sql-altertype-title"></member>
</simplelist>
</refsect1>
diff --git a/doc/src/sgml/ref/drop_operator.sgml b/doc/src/sgml/ref/drop_operator.sgml
index 5b17ebec1b5..b928e721936 100644
--- a/doc/src/sgml/ref/drop_operator.sgml
+++ b/doc/src/sgml/ref/drop_operator.sgml
@@ -1,5 +1,5 @@
<!--
-$PostgreSQL: pgsql/doc/src/sgml/ref/drop_operator.sgml,v 1.24 2003/12/02 00:26:59 tgl Exp $
+$PostgreSQL: pgsql/doc/src/sgml/ref/drop_operator.sgml,v 1.25 2004/06/25 21:55:50 tgl Exp $
PostgreSQL documentation
-->
@@ -20,7 +20,7 @@ PostgreSQL documentation
<refsynopsisdiv>
<synopsis>
-DROP OPERATOR <replaceable class="PARAMETER">name</replaceable> ( <replaceable class="PARAMETER">lefttype</replaceable> | NONE , <replaceable class="PARAMETER">righttype</replaceable> | NONE ) [ CASCADE | RESTRICT ]
+DROP OPERATOR <replaceable class="PARAMETER">name</replaceable> ( { <replaceable class="PARAMETER">lefttype</replaceable> | NONE } , { <replaceable class="PARAMETER">righttype</replaceable> | NONE } ) [ CASCADE | RESTRICT ]
</synopsis>
</refsynopsisdiv>
@@ -128,6 +128,7 @@ DROP OPERATOR ! (bigint, none);
<simplelist type="inline">
<member><xref linkend="sql-createoperator" endterm="sql-createoperator-title"></member>
+ <member><xref linkend="sql-alteroperator" endterm="sql-alteroperator-title"></member>
</simplelist>
</refsect1>
diff --git a/doc/src/sgml/ref/drop_tablespace.sgml b/doc/src/sgml/ref/drop_tablespace.sgml
index ba8415208e3..bd4fb6dcd5e 100644
--- a/doc/src/sgml/ref/drop_tablespace.sgml
+++ b/doc/src/sgml/ref/drop_tablespace.sgml
@@ -1,5 +1,5 @@
<!--
-$PostgreSQL: pgsql/doc/src/sgml/ref/drop_tablespace.sgml,v 1.1 2004/06/18 06:13:05 tgl Exp $
+$PostgreSQL: pgsql/doc/src/sgml/ref/drop_tablespace.sgml,v 1.2 2004/06/25 21:55:50 tgl Exp $
PostgreSQL documentation
-->
@@ -80,6 +80,7 @@ DROP TABLESPACE mystuff;
<simplelist type="inline">
<member><xref linkend="sql-createtablespace" endterm="sql-createtablespace-title"></member>
+ <member><xref linkend="sql-altertablespace" endterm="sql-altertablespace-title"></member>
</simplelist>
</refsect1>
diff --git a/doc/src/sgml/ref/drop_type.sgml b/doc/src/sgml/ref/drop_type.sgml
index 3ac172b5b4b..da0f6bc8b63 100644
--- a/doc/src/sgml/ref/drop_type.sgml
+++ b/doc/src/sgml/ref/drop_type.sgml
@@ -1,5 +1,5 @@
<!--
-$PostgreSQL: pgsql/doc/src/sgml/ref/drop_type.sgml,v 1.25 2003/11/29 19:51:38 pgsql Exp $
+$PostgreSQL: pgsql/doc/src/sgml/ref/drop_type.sgml,v 1.26 2004/06/25 21:55:50 tgl Exp $
PostgreSQL documentation
-->
@@ -95,6 +95,7 @@ DROP TYPE box;
<simplelist type="inline">
<member><xref linkend="sql-createtype" endterm="sql-createtype-title"></member>
+ <member><xref linkend="sql-altertype" endterm="sql-altertype-title"></member>
</simplelist>
</refsect1>
diff --git a/doc/src/sgml/reference.sgml b/doc/src/sgml/reference.sgml
index b5d42361ce7..5230e07119e 100644
--- a/doc/src/sgml/reference.sgml
+++ b/doc/src/sgml/reference.sgml
@@ -1,5 +1,5 @@
<!-- reference.sgml
-$PostgreSQL: pgsql/doc/src/sgml/reference.sgml,v 1.49 2004/06/18 21:24:04 tgl Exp $
+$PostgreSQL: pgsql/doc/src/sgml/reference.sgml,v 1.50 2004/06/25 21:55:51 tgl Exp $
PostgreSQL Reference Manual
-->
@@ -45,11 +45,14 @@ PostgreSQL Reference Manual
&alterFunction;
&alterGroup;
&alterLanguage;
+ &alterOperator;
&alterOperatorClass;
&alterSchema;
&alterSequence;
&alterTable;
+ &alterTableSpace;
&alterTrigger;
+ &alterType;
&alterUser;
&analyze;
&begin;